View Full Version : Did I make a fool of myself


DCrake
02-18-2011, 02:04 PM
I have been a programmer in Access and VB6 for many years now, and until today I thought I was pretty skilled at it, thinkning off the top of my head and all that. Well today I had to see a company about a VB6 contract, and I was aware that he was going to test my skills.

He brought out notepad and asked me to write a function that used Factorial

Such as 5! = 5*4*3*2*1 = 120

Off the top of my head and without access to the internet I failed miserabley. Next he asked me to write another function that would perform a sort on a given set of numbers or letters either a-z or z-a or 1-9 or 9-1. I thought of some sort of bubble sort using an array. But plucking the code right out of thin air without any reference to other resources made me feel like getting up and walking out. I felt a right fool, telling him about all what I had done in the past and could not come up with anything remotely logical. What a dork.

Very much doubt if I get the contract.

One thing I did get right was to write the SQL to display matching records between two table where field 1 in table 1 matched field 2 in table 2. But I could not use a where condition.

Thank heavens that I remembered about left inner joins.

finally he said I have 2 buckets one can hold 3 gallons another holds 5 gallons how do you get the larger one to contain 4 gallons.

1st attempt was to suggest placing the smaller one in the larger one and use displacement. Did not want that approach.

2nd attempt was that I know 1 gallon weighs 10 pounds so I asked if I could use scales, Nope.

In the end I got the answer, but bloody hell, what I have to go through to get work.

ChrisO
02-18-2011, 05:02 PM
>>He brought out notepad and asked me to write a function that used Factorial<<

Whatever you wrote in notepad worked.

Assume: write a function that used Factorial, on a slab of granite, using invisible ink, twenty thousand leagues under the sea.

The point being: did the test environment complain or was the tester trying to not accept the very test environment he gave you?

Notepad was the test environment he gave you and whatever you wrote was accepted by that test environment.

It was a failure of logic on behalf of the tester not to give a reasonable test environment and to not accept the results of the test he gave you.

Recommended reading for the tester: -
Lewis Carroll: 'Alice's Adventures in Wonderland' and 'Through the Looking Glass'.

Chris.

smig
02-19-2011, 04:06 AM
not realy sure what he was looking for.
seems like a test for your logic thinking ability and not for your VB/Access programming skills.

spikepl
02-19-2011, 05:25 AM
Don't assume that people hiring other people know what they are doing, or know what is the best way to determine the match (or lack thereof) between an applicant and the job at hand :D

Ever heard of the Peter Principle? Google it, and I bet it'll make you feel better.

vbaInet
02-19-2011, 06:04 AM
These are common questions asked at interviews because of your skill set and level. You will also find that questions like write an algorithm to make a simple chess program, to get prime numbers, fibonacci series, different sorting algorithms and their complexity time etc. You will find that mostly big organisations ask these sort of questions. Sometimes they will ask you to do it on a whiteboard or do it on Notepad, hardly will they give you a proper IDE to write the algorithm on.
He brought out notepad and asked me to write a function that used Factorial

Such as 5! = 5*4*3*2*1 = 120
Why Notepad? Well, it's not about the accuracy of the algorithm and whether it contains error or not, it's about your logical reasoning. They don't expect it to be a working program (but it would be nice if it compiles) but they expect that your steps were logical and well thought out - depending on the time frame given.


Next he asked me to write another function that would perform a sort on a given set of numbers or letters either a-z or z-a or 1-9 or 9-1. I thought of some sort of bubble sort using an array.
This one is a bit harsh as it's the sort of question you would expect when being interviewed by Microsoft. Actually, they (i.e. Microsoft) do ask questions related to sorting algorithms but they tend to go into more detail about it.

finally he said I have 2 buckets one can hold 3 gallons another holds 5 gallons how do you get the larger one to contain 4 gallons.
This is just another aptitude test so it's not related to your ability to program. People in the IT, Science and Engineering fields would normally get asked this question, but you will be suprised that they may even ask Economists too :)

ions
02-19-2011, 10:28 AM
The reason you had trouble as I would probably have is because

1) For these type of logical problems I like to be in a silent room that I am comfortable in, alone and not under time pressure.

2) Sort algorithms are already coded for us, same with factorial so we don't practice that kind of thinking once we leave university.

vbaInet
02-19-2011, 10:40 AM
1) For these type of logical problems I like to be in a silent room that I am comfortable in, alone and not under time pressure.If you anticipate the sort of questions that are going to be asked (maybe by asking people who have been to the interview before) then you will be able to manage.


2) Sort algorithms are already coded for us, same with factorial ...There's no built-in sorting algorithm for Arrays in VBA and in this instance we have to code our own. Some other OOP languages have a function built-in to the Array class.


2) ... so we don't practice that kind of thinking once we leave university.Depends on your background and your current interests or job. For people who are into research and theoretical computer science working with algorithms is a routine task.

smig
02-19-2011, 11:32 AM
Sort algorithms are already coded for us
I remember when I started programming in VB (many yars ago) I had a need for sorting an array.
As I ever realy learned programming in school or any other class I made my oun sort routine.
I talked to a friend who is much younger and was already a skilled programmer, and he said "Ho, This is simple, it's a bubble sort, but you can use a sort function"
Truth is I was very happy I recreated the bubble sort :)

stopher
02-19-2011, 11:44 AM
If you anticipate the sort of questions that are going to be asked (maybe by asking people who have been to the interview before) then you will be able to manage.I agree of course but it's easy to say after the event. But consider the scenario...you think you're pretty hot on vb (or whatever your hot topic is)). You think, "what else do I need to prepare for". So you go along to an interview for a vb coder. And they hit you with some abstract problems. Even if someone had told you that this or that might come up you'd have probably been happy with your skill set and shrugged it off.

Imho it takes an one or two events like this to shape you up to these sort of tests. Kind of a tap on the head.

There's no built-in sorting algorithm for Arrays in VBA and in this instance we have to code our own. Some other OOP languages have a function built-in to the Array class.I think ions point is these things are always at your fingertips when you're at the office. I'm pretty hot on logistics (my field) but I still rely on google a lot for qualifying my knowledge. After 20+ years in the industry I wouldn't start revising my CPC (a logistics certification) for a job interview.

Depends on your background and your current interests or job. For people who are into research and theoretical computer science working with algorithms is a routine task.I might be wrong but I don't think that was the kind of job David was tending for.

vbaInet
02-19-2011, 12:06 PM
I can actually name a couple of big organisations that asks these sort of questions. If someone had told me this or that was going to come up I wouldn't shrug it off just because I feel I'm a good programmer, I would do it and memorise the formation, not the code. There's a site, I think it's called Euler.net or something, and in there are lots of questions regarding building algorithms to solve certain problems. If you're able to go through most of the questions on that site then questions like this will be a breeze when asked. Obviously, practice makes perfect in this scenario.

If that was your dream job I bet you will spend lots of man hours going through your CPC ;)

He's gone for a VB6 developer position (in most likely a big organisation), so they are thinking algorithms, OOP, 10+ years in the field, we can dish out hard questions :) They normally don't want the full algorithm but for the candidate to show that he or she knows the different sorting algorithms and how to implement them. These are standard questions for positions within Java, C, C#, VB.net etc. They don't expect him to get all questions right, they just want to test his level of reasoning. There would be something in the Job Description that justifies their asking this sort of question (i think).

Oh, by the way David, no you didn't make a fool of yourself. You did the best you could but I do hope you showed them that you were confident in problem solving but at that point in time couldn't think straight. If they see you're confident they will be willing to offer you the contract.

DCrake
02-19-2011, 01:23 PM
I have been reading the discussions going on from my opening thread, and I understand alot of things that are being said. However, for someone who have never been put in this situation before, I was quite daunted, The last time I attended and actual interview for a job was about 12 years ago and was offered the job on the spot. I have also interviewed people myself for jobs, but I do not take the approach that if they can write an algorithm then they can do the job.

Its a bit like going for a job as a chef if you can cook what's on the menu then why the need to be able to butcher the cow? You let the butcher do that, all you do is cook the damm steak. It's fine if you have the ability and can recognise a good cut of meat from a bad one but it is not essential.

I think that my attitude stems from the fact that I have always been self taught, yes, I have read the book, and watched the video, and climbing on the backs of giants can be a clever thing. But if the client wants to see you perform brain surgery as a pre-emptive exercise then to me that's OTT.

Remember the story of the eagle and the wren. Which bird can fly the highest. The Eagel said "I am big and strong and have larger wing span with great muscle power and can fly far higher than the little wren."

So the eagle took off and flew up and up and up until he could fly no higher. Looking down he scoured the ground looking for the little wren, he was no where in sight. Then al of a sudden he hear the wren call out. "Hi Mr Eagle" the voice came from above. He looked up and saw the littel wren hovering aboove him.

"How did you manage to fly so high when you are so small?" the eagle asked. "Actually I was sat on your back all the time just waiting for you to run out of steam." So the wren won the bet.

This is not the actual quotation it is just how I remember the story going. But my point is, There is more than one way to skin a cat. And why re-invent the wheel or spend 80% of your time on 20% of the problem when you refer to other more inteligent or people to provide the answer, well if not the complete solution, a push in the right direction. Is that not why we are all memers of this forum?

If he has sat me in a room and gave me 20 mins I would have given him the answers in time - via google and AWF. Would than not of shown resourcefullness and the ability to come up with a solution in the shortest possible time. Thus increasing productivity.

I hope I don't get offered the contract anyway as the rate was poor and the location was far away. Bu that is beside the point.

vbaInet
02-19-2011, 03:47 PM
Yes, but it's just how they want it to be these days. I bet it was the client that insisted on them asking applicants those questions. If it's a core programming position such as a Software Developer (i.e. not Junior) then the chances of them asking is high.

"Actually I was sat on your back all the time just waiting for you to run out of steam."That was actually quite funny!:D

I hope I don't get offered the contract anyway as the rate was poor and the location was far away.Give them a quick ring so you don't get disappointed when you're told you've got it :p

DCrake
02-19-2011, 03:52 PM
Actually what happened was I came home did a quick search, go the answers and emailed them back to them and said.. Here you are..... proven and tested answers to your questions... not my solutions but the correct ones. Why re invent the wheel? It may have taken me x times longer to get the answer when one quick Goggle would have given me the answer. In my eyes I would sooner have a correct proven solution, tried and tested than a guestimate anytime.

vbaInet
02-19-2011, 04:06 PM
With your actions they may think, "this guy is serious about this position and has got a can-do attitude. Let's give it to him".

But if you do get it you already know the sort of time-frame your client would expect fairly complex solutions to be delivered.

Good luck!

DCrake
02-19-2011, 04:22 PM
Wha is ironic is that or 2 years I worked in the same building but on a floor higher than them and saw then sneaking out for a fag many times every day. My previous contract only ended 3 weeks prior to me revisting the location and yes I did bump into people from the above floor.

Do I really want to work 50 yards away from my previous empoyer so to speak, getting pestered for support and whatever, I fear not. Anyway we shall see what happens.

But with the demise of the Government closing down of all the PCT's thus potentially placing all the contrators on the unemnploed line beggers can't be choosers.

I have spent the last 6 years on a very comfortable rate only to be contronted with a situation wher I need to seriousley evalualte my circumstances. but if I end up on the proverbial scrap heap so be it. I am 55 now and sufferning from severe COPD but I can still get along 3 yrs left on my big mortgage......early retirement and all that.. Maybe I might even win the Lotto0, who knows.

Pissed again

David

GalaxiomAtHome
02-19-2011, 04:29 PM
It is always difficult to assess a candidate's skill at interview and bigger institutions with specialist HR staff often resort to this kind of thing because there isn't time to do it better.

However these tests don't really address the most important capabilities of a programmer. They are aimed at testing a random microcosm.

Systems Analysis, the ability to convert an abstract specification into structure, is the crucial skill. Where there is an element of this in the test they used it is more akin to asking an automotive engineer to design a spark plug.

The engineer can work with the specifications of a spark plug and knowing the exact detail of such an object of the top of their head is not important. The engineer would likely be able to work with references to understand spark plug design better than the spark plug specialist would cope with designing an engine.

Maybe they were looking for a code jockey to write small pieces for the master and the test would be quite appropriate. In that case you wouldn't want the job anyway because it would be boring.

I am a competent systems analyst and I consider myself a good programmer but Google is integral to that skill. One of my primary strengths is the ability to formulate a search that will get me the code block I need even when I don't know exactly what I am looking for.

A search will often reveal there are often many way to approach a problem and it is important to be able to compare the different strategies. The crucial ability is to be able to critically examine the code. There is a lot of quite clumsy code online with considerable scope to improve on it or adapt it to precise needs.

If I was testing someone I would provide an example of code and ask them to explain how it worked, point out the vulnerabilities I had included in it and show how it could be made more efficient. This is a much closer match to how I think most of us work.

DCrake
02-19-2011, 04:34 PM
I understand what you are saying. for example if you was using a selet case statement and you was examining the day of the week. Now obviously thre is only 7 but I would still incule the Case Else as the 8th option just in case somethng went amiss. What you don't want is the program bommiong out on you when you least expect it to do, do you?

ChrisO
02-19-2011, 05:03 PM
David, I think that sort of response on your part is perfectly acceptable.

A tradesman knows his tools and if he doesn’t have the correct tool he either knows where to get it or he builds it.

I perceive the tester as being a smartarse. The tester seems more intent on trying to prove that someone can not do a specific task and, in trying to prove that position, provides an unacceptable and hostile environment.

He (she) should have been more interested in arriving at the best quality * time product. That may mean doing a Google or it may mean looking up something we have done in the past, whatever.

But the tester seems more interested in proving someone wrong than in trying to achieve the best cost-effective result for the company that pays his (her) salary.

To my mind, the interviewer failed the interview…

Chris.

gemma-the-husky
02-19-2011, 05:18 PM
Dave

I could write a bubble sort algorithm of the top of my head - but I certainly couldnt write a quick sort algorithm, without looking it up - but I do know the relative efficiency of each of them, which might impress them.

I could write a simple factorial function with a couple of variables - but if they wanted a recursive one, I would need to play a bit - although I've written the recursive fibonacci sequence algorithm enough times to be able to do that straight off.

funny you mention factorials as the next thread on this forum is about combinations of objects.

A puzzle is just a puzzle - the buckets one is well known

fill the 3 - put it in the 5
fill the 3 again, put 2 in the 5 to fill it - leaving 1 in the 3
empty the five
put the 1 in the 3 into the 5
fill the 3 and put in the 5


I never realised they would get you to do silly things like that - i suppose its like giving a typist a typing test - but if you don't expect it, it would come as a shock, wouldn't it?


But i'm sure I wouldn't have ben able to write the SQL without having access open!

its a bit like when Kasparov was on a TV programme - and they asked him to analyse a trivial chess position - expecting him to demonstrate a mate about 8 moves deep - and instead he produced an outbusrt about the irrelevance of the question.

Uncle Gizmo
02-19-2011, 05:27 PM
Well I think I would have told him to get lost!

I don’t think I would have put it quite that bluntly, but that’s the general attitude I would have taken. You were attending an interview for an MS access job, not to see if you would be any good in the pub quiz team!

Let me ask you an intelligence question I once heard:
A small boy he lives in a block of flats, when he goes to school in the morning he takes the lift, when he comes home at night, he takes the lift and stops at the fourth floor, then takes to the stairs to complete his journey home. Why?

gemma-the-husky
02-19-2011, 05:30 PM
Well I think I would have told him to get lost!

I don’t think I would have put it quite that bluntly, but that’s the general attitude I would have taken. You were attending an interview for an MS access job, not to see if you would be any good in the pub quiz team!

Let me ask you an intelligence question I once heard:
A small boy he lives in a block of flats, when he goes to school in the morning he takes the lift, when he comes home at night, he takes the lift and stops at the fourth floor, then takes to the stairs to complete his journey home. Why?

another old one - cos he's a small boy - i'll leave it at that

Uncle Gizmo
02-19-2011, 05:47 PM
Yes correct Dave, however it’s an interesting question because as an IQ test question it doesn’t work. To answer the question you have to have firsthand knowledge of how lifts work. If you don’t have this knowledge then you can’t answer the question, and what’s that got to do with your intelligence?

It’s the same as if someone decided to ask all the interview questions in French, it’s just not a fair test.

Let me present you with another question:
A man is putting a new driveway in his garden. He fills the wheelbarrow with rubble, then wheels the wheelbarrow 20 yards up the road, turns round and comes back, then pushes the wheelbarrow up the scaffold board and tips the contents into the waiting skip. He then jumps off the skip with the wheelbarrow crosses the road a distance of not more than half a dozen yards back to his drive and commences the process again.

Why did he go 20 yards out of his way?

GalaxiomAtHome
02-19-2011, 07:40 PM
Why did he go 20 yards out of his way?

He needed the runup to get up the ramp?

He would have to cross formwork or wet concrete to get the high side of the skip by any other path but could jump it down on the low side?

The_Doc_Man
02-19-2011, 08:44 PM
I have some experience from the "other side" of the interview table that might offer some insight. Or might not.

Some years ago and at least five or six employers ago, I used to be the HR programmer liaison for my company because the HR department knew they weren't qualified to determine the suitability of programmer candidates. I used to ask questions like that, but I actually didn't care if anything they wrote ran or was excruciatingly correct. I wanted to see who would try to bamboozle me. You would (or maybe wouldn't) be surprised at the silly answers I got.

I told them up front that I was on a fishing expedition to try to identify what they knew and what they didn't. I warned them that my questions were probably not what they expected, and I even told them that I was more interested in their approach than actual results. But the ones who didn't listen and who protested the questions were the ones who told me exactly what I needed to know ahead of time. The ones who said, "I didn't study that in school, but I can look it up in a library if it becomes necessary" were the ones who got the job. They admitted their limitations and didn't try to "blow smoke" as the phrase goes.

I'm not saying that is what happened to you, DCrake, but I remember folks saying that my interview was the toughest one they ever had to take. Many folks admitted that I scared them. The ones that got hired were told exactly why they were hired - mostly because they didn't try to lie and claim an ability they didn't have. It was their honesty in admitting their abilities that convinced us.

In fact, one of my real success stories was a young woman who came to the US from Taiwan. In her home, she was a student of cooking and home economics. She wanted to change careers and took some computer courses to support that change. I gave her my usual interview and fished around. She was one who walked out thinking, "Oh what a mistake I made coming here, I'll never get a job in programming."

I surprised her (and a lot of others) because I recommended her for immediate hire. Why? Because she didn't have a portfolio of programs. Instead, she showed us a book she had co-authored on the subject of Imperial Chinese Cuisine, essentially recipes from historical times. She showed diligence, meticulous attention to detail, a good approach to explaining what needed to be done in a formulaic way, and the ability to finish a daunting project. Who wouldn't want such a person on their team?

Over thirty years later, she is still in the business and is now a manager of her own group. And a friend.

Uncle Gizmo
02-20-2011, 01:30 AM
He needed the runup to get up the ramp?


That's a good answer but not the one I'm looking for.

Uncle Gizmo
02-20-2011, 01:31 AM
He would have to cross formwork or wet concrete to get the high side of the skip by any other path but could jump it down on the low side?

That's a good answer and a very good answer, very near what I am looking for but not quite right.

Uncle Gizmo
02-20-2011, 01:59 AM
I saw some MS Access tests posted on the Internet somewhere, and the nature of the question was something like “where would you find such and such a button for doing such and such a task” in other words how good are you at getting around the interface. I didn't have a clue; I couldn’t answer the question, not without sitting in front of a machine, not because I didn’t know, when I’m sat in front of the machine I know exactly where it is, it’s because my memory is what they term “kinetic” I record my memory as a set of actions. If you ask me a phone number, I can’t recite it back to you, but give me a piece of paper and a pen and I will write it down.

I think the real answer to your question is; does the person asking the questions have any idea what they are doing?

Some excellent comments there from Doc_man, giving an insight into the other side of the interview table.

gemma-the-husky
02-20-2011, 02:09 AM
uncle gizmo - the wheelbarrow

I can only think there were maybe two routes, one long and gradual, the other steeper, and he couldn't use the steeper route with a full wheel barrow. Maybe a hill involved as well - but I can't visualize quite how!

DCrake
02-20-2011, 02:13 AM
Similar to the boy in the lift:

A man lives on the 30th floor of a block of flats, when the sun shines he get off the lift at the 26th floor and walks the rest using the stairs, however when it rains he goes all the way to the 30th floor. Why?

Uncle Gizmo
02-20-2011, 02:21 AM
uncle gizmo - the wheelbarrow

I can only think there were maybe two routes, one long and gradual, the other steeper, and he couldn't use the steeper route with a full wheel barrow. Maybe a hill involved as well - but I can't visualize quite how!


Very very close!
Now think about roads, pavements, changes in levels.

Uncle Gizmo
02-20-2011, 02:24 AM
Similar to the boy in the lift:

A man lives on the 30th floor of a block of flats, when the sun shines he get off the lift at the 26th floor and walks the rest using the stairs, however when it rains he goes all the way to the 30th floor. Why?

It’s one of these modern lifts, all glass construction; it operates very much like a greenhouse during the day when it’s sunny the temperature builds up to an unbearable level in the upper levels.

DCrake
02-20-2011, 02:25 AM
He only had one plank so he had to go down the road until he got to the place in the pavement where the kerb had been lowered.

DCrake
02-20-2011, 02:27 AM
It’s one of these modern lifts, all glass construction; it operates very much like a greenhouse during the day when it’s sunny the temperature builds up to an unbearable level in the upper levels.

Sorry, no where near.

Uncle Gizmo
02-20-2011, 02:32 AM
Similar to the boy in the lift:

A man lives on the 30th floor of a block of flats, when the sun shines he get off the lift at the 26th floor and walks the rest using the stairs, however when it rains he goes all the way to the 30th floor. Why?

He takes the stairs when the sun shines because each landing stage has a window which looks out on the verandas of the flats. The young ladies are all out on their verandas sunbathing.

Uncle Gizmo
02-20-2011, 02:37 AM
He only had one plank so he had to go down the road until he got to the place in the pavement where the kerb had been lowered.

I reckon that's good enough Dave ....


The wheelbarrow question isn’t any question I actually heard anywhere, it’s actually me Wheeling stuff and depositing it in the skip. This was a few years back when I was young and fit, I had recently heard the problem of the little boy in the elevator and I realised that I could use my skip filling experience to demonstrate that firsthand knowledge is required.

If you place the skip in the road then you need a skip licence, you are also required to make sure the skip is “lighted” at night, has a red light one end and a white light the other. To avoid getting a licence it was always desirable to place a skip somewhere off the road, if you were lucky enough to have a wide pavement, a pavement which also incorporated a grass strip, then this was the ideal place to put the skip.

The problem is that the skip is now at pavement level, in other words there is a kerb to mount if you want to gain access with your wheelbarrow. There are several solutions to this problem, the one I favoured in this particular case was to go up the road a short distance until I found a dropped kerb, an entrance to a neighbour’s drive, use that slope to mount the pavement and then yes you have a nice run up to the ramp straight into the skip!

GalaxiomAtHome
02-20-2011, 02:39 AM
Ah. He is concreting the driveway so there is a step up to the road. But this would not be particularly large comparded to the clmb into the skip so he could easily ramp this.

Maybe he has to use the gate at the other end of the driveway?

I notice though that the original question says "he crosses the road" on the way back. I think this must be the key.

Uncle Gizmo
02-20-2011, 02:46 AM
"he crosses the road"


Yes, that is an important part of the question; the skip has to be on the other side of the road. If the skip was on the same side of the road then you are already at pavement level, in other words you would not need to mount a kerb to gain access to the skip.

GalaxiomAtHome
02-20-2011, 02:48 AM
I have pushed heavy barrows a lot. One certainly trys to avoid steep gradients but momentum is the key factor in selecting a path. It is surprising how high the barrow will ascend if it can get moving fast enough.

Lightwave
02-20-2011, 02:55 AM
All I can say is that if I was looking for database access expertise and I needed someone really good. Simply knowing your background on the forums would 95% get the job. I would want to meet with them just to make sure there's not a personality clash but other than that probably academic. And age would not be an issue. Older maybe better as young person might be flighty.

Kind of fun puzzles though. But I agree you need quiet to work through those things. Took me ten to figure out the bucket thing.

Uncle Gizmo
02-20-2011, 03:00 AM
A few years ago my company, primarily a gravel delivery company decided to undertake domestic clearance work. Basically removing rubbish from people’s gardens.

At this time government had introduced new legislation whereby for each and every job you had to provide a risk assessment before undertaking any work. Our insurers also provided a consultation service where if you had a particular problem with writing up your risk assessment you could ask them for advice.

My concern was that I would be employing labourers to operate wheelbarrows, I wondered if I should include in the risk assessment how the wheelbarrow should be operated.

When I rang them up and ask them they fell around laughing! I still think I was right, a wheelbarrow is quite a dangerous item and its operation should be discussed and thought through thoroughly. Mind you I did understand why they laughed!

Uncle Gizmo
02-20-2011, 03:20 AM
finally he said I have 2 buckets one can hold 3 gallons another holds 5 gallons how do you get the larger one to contain 4 gallons.


Obviously a Bruce Willis fan, I recall one of Bruce Willis's characters had to answer a similar question to stop a bomb going off.

Uncle Gizmo
02-20-2011, 03:28 AM
Took me awhile,
Fill the 5 gallon container, from the 5 gallon container fill the 3 gallon container, this leaves you with 2 gallons in the 5 gallon container. Empty the 3 gallon container. Tip the 2 gallons from the 5 gallon container into the 3 gallon container. Refill the 5 gallon container, and then tip 1 gallon from the 5 gallon container into the 3 gallon container.

In other words once the 3 gallon container is full (remember it initially contained 2 gallons) your 5 gallon container will be 1 gallon less, in other words will now contained 4 gallons.

DCrake
02-20-2011, 03:52 AM
The answer to my lift question was that the little old fellow could not reach the button for the 30th floor. But when it was raining he had his umberella with him so he used it to reach the button.

Using thrid party resources I think you call it.

Uncle Gizmo
02-20-2011, 04:02 AM
The answer to my lift question was that the little old fellow could not reach the button for the 30th floor. But when it was raining he had his umberella with him so he used it to reach the button.

Using thrid party resources I think you call it.


Ah... now I would have never have got the answer to that question, In my book men do not carry umbrellas!

DCrake
02-20-2011, 04:23 AM
This one takes a bit of lateral thinking:

A man and his wife are fast asleep in bed, the man is having a vivid dream that he has been captured during the French revolution and is about to be beheaded. They march him up to the block and kneel him down and place his head under the blade. Just as they were about to release the blade his wife rolled over in bed and hit him on the back of his neck. The man had a massive heart attach and died instantly.:eek:

What is wrong here?

Another one:

BackGround:
Two identical twins, both boys, cannot be seperated in looks, the only difference between them was that one never told a lie whilst the other never told the truth.

Situation:
You bump into one of them at the bus stop and need to know if the bus has gone past lately. The problem is that you can only ask him one question only, then based on his answer you find out if you have missed the bus or not.

Problem:
What do you ask him?


BTW:He is not waiting for a bus.

Brianwarnock
02-20-2011, 04:40 AM
You ask one what the other would answer, that answer is a lie.

brian

DCrake
02-20-2011, 04:53 AM
Did you know the answer or did you work it out?

I have found very few people who can fathom that out.

This one is for the people not members of Mensa

A man follows a route identical to an equilateral triangle every day to work. From home to the first bend it takes him one hour and twenty minutes. From this point to the second bend in the road again it takes him one hour and twenty minutes. But from this point to his workplace takes him eighty minutes. Why?

Brianwarnock
02-20-2011, 05:08 AM
I worked it out.

He works at home.


Brian

DCrake
02-20-2011, 05:13 AM
It helps if you know what an equilateral triangle looks like

step 1 A - B
step 2 B - C
step 3 C - A

Brianwarnock
02-20-2011, 05:15 AM
Way back when I was an A level school boy a master told us that
"There is the knowledge, and there is knowledge of the knowledge, and in life you will find that the latter is the more important".

What he was basically saying is that you can only know so much detail, but provided that you know of something you can research it, a bit like learning the index of a book as opposed to every page.

Maybe the interviewer was testing that you had knowledge of the concepts rather than the ability to write the code off the top of your head.

Brian

gemma-the-husky
02-20-2011, 05:25 AM
Took me awhile,
Fill the 5 gallon container, from the 5 gallon container fill the 3 gallon container, this leaves you with 2 gallons in the 5 gallon container. Empty the 3 gallon container. Tip the 2 gallons from the 5 gallon container into the 3 gallon container. Refill the 5 gallon container, and then tip 1 gallon from the 5 gallon container into the 3 gallon container.

In other words once the 3 gallon container is full (remember it initially contained 2 gallons) your 5 gallon container will be 1 gallon less, in other words will now contained 4 gallons.

similar idea in my post #5 - although yours takes fewer moves - and i think
the original puzzle specified the number of pours you could make.

Not a riddle - but has anyone seen Very Hard Puzzle - a free iTouch app.

Basically you have to completely cover a large circle with 5 smaller discs. Very very hard - its discussed in Martin Gardner's Mathematical Puzzles books - a wonderful source of maths entertainment.

DCrake
02-20-2011, 05:25 AM
I don't know what he had in mind or what he was hoping to see but I failed miserably.

I suppose its a bit like taking exams, there are techniques to answering the question right. My son once did a maths test at school and was marked down for not showing his workings out. Because he worked the answer out in his head then wrote it down the teacher thought he had been cheating.

Then you get the flip side of this was when I went to college as a mature student in the 80's we had to design a fire drill notice. Don't know why it just came up in the exam. Anyway as we were all seated in a large assembly room about 150 students, all around the room were these signs "In Case of Fire...." well as you can imagine everyone simply copied out the signs. Now the college could not take them down as it would break the fire risk assesment rules. And they could not mark us down for using our innitiative.

DCrake
02-20-2011, 05:36 AM
Another faux pas that I remember, it ws at the ame college as above. It was my birthday and we had to take our final exam module Travel and Tourismn. The lecturer had gone to the trouble of bringing in an actual travel agent from the local Airtours agency.



The first part of the test was oral. A bit of role play, I was the travel agent he played the customer. I had to find him a holiday destination and do all the necessary paperwork.

I need to point out that I was first to do the oral part as I wanted to go for a pint after.


Now this was early June and he said he wanted to go away in July. Then remembering the booking arangements I askd him if he had the £2k on him there and then as it was less than 10 weeks of the departure date. He said not, So I said I will pu the holiday on hold and if he came back within 48 hours with the cash I would complete the big booking form and secure his holiday.

So that was the end of my oral and I went into another room to do the written part.

Well the next and subsequent students who went in for the oral exam were told "I know it's June but let's pretend it's January..." This meant they all had to fill in the booking form. Not me. Ha Ha.

And I still got an A* for it.

Banana
02-20-2011, 05:37 AM
This one takes a bit of lateral thinking:

A man and his wife are fast asleep in bed, the man is having a vivid dream that he has been captured during the French revolution and is about to be beheaded. They march him up to the block and kneel him down and place his head under the blade. Just as they were about to release the blade his wife rolled over in bed and hit him on the back of his neck. The man had a massive heart attach and died instantly.:eek:

What is wrong here?

I've actually heard a similar form of this and the answer is how would we have known what he was dreaming if he had died immediately? This is a interesting twist because when we hear a story in 3rd person, we attribute omnipresence & omniscience to the narrator but we would react much differently if it was the wife telling the story instead of an unnamed narrator.

DCrake
02-20-2011, 05:44 AM
Top marks.

What are the next 2 letters in this sequence

O, T, T, F, F, S, S, E, ?, ?

Uncle Gizmo
02-20-2011, 08:17 AM
top marks.

What are the next 2 letters in this sequence

o, t, t, f, f, s, s, e, ?, ?

e, r, ....?

Please note I used upper case characters but they were automatically changed to lower case? I tried twice as well!

DCrake
02-20-2011, 09:31 AM
Not right.

But I will tell you the answer and see if you can work out why

N & T

vbaInet
02-20-2011, 04:46 PM
I was doing some silly calculations until it dawned on me... the first letter of each word, One to Ten? I could be wrong.

Banana
02-20-2011, 05:10 PM
Gee whiz. Would have never thunk of that one.

Here's one:


Bill stared through the grimy and dreary window on 42th floor. Overcome with depression, he slid the windows open and went through it. It is a great height to the ground and there was nothing to slow down his descent or cushion his landing. Yet, Bill was miraculously unhurt at the ground.

How?

Galaxiom
02-20-2011, 05:17 PM
Bill is a window cleaner and went into the room. He then walked to the ground.

Galaxiom
02-20-2011, 05:36 PM
Here is another puzzle.

"neat learnt absent"

Take out ten letters from this phrase to leave letters that spell the name of a fruit.

vbaInet
02-21-2011, 02:02 AM
banana? I bet this was inspired by Banana ;)

GalaxiomAtHome
02-21-2011, 02:12 AM
banana? I bet this was inspired by Banana ;)

Well done. Actually the original I saw in a trivia night question also used Banana. Banana reminded me of it. The original arrangement was random. The phrase arrangement was my contribution.

dan-cat
02-21-2011, 03:58 AM
If I was holding that interview, I wouldn't be interested in whether you could write a sorting algorithm from the top of your head. A tool for my business would have been written for that long ago.

I would be more interested in what tools you had developed to save time and money. Have you used Entity Framework, linqtosql etc etc.

Questions like you underwent underline that these people don't actually know what they want. They are just questions designed to filter down a large number of candidates, nothing more.

I'll tell a story...

Once a company had to develop a template system for different emails in .net. The brightest member of the inhouse team came up with an object with properties for each section of the email which was then saved to xml. To change the properties of the email, you had to open the xml file, amend the html of the appropriate property and save and reupload. Ugly as hell but the team member could probably answer the type of questions you mentioned.

I then had to spend time coming up with an alternative. Using a .net user control with a data object assigned to it which was then dynamically loaded on request. The solution was a tool that saved time and money and instantly relegated the other solution to the trash.

If an interviewer has no interest in using tools to complete a task then tell him to go build a car with his bare hands.

If I was interviewing you and you told me how to save time and money, you would have my attention but unfortunately the people doing the interviews don't usually care about this. They prefer to stroke their own egos with arbitrary questions that have nothing to do with what the owners really want.

Rabbie
02-21-2011, 06:06 AM
This one takes a bit of lateral thinking:

A man and his wife are fast asleep in bed, the man is having a vivid dream that he has been captured during the French revolution and is about to be beheaded. They march him up to the block and kneel him down and place his head under the blade. Just as they were about to release the blade his wife rolled over in bed and hit him on the back of his neck. The man had a massive heart attach and died instantly.:eek:

What is wrong here?
How did they lnow what he was dreaming?:D
Another one:

BackGround:
Two identical twins, both boys, cannot be seperated in looks, the only difference between them was that one never told a lie whilst the other never told the truth.

Situation:
You bump into one of them at the bus stop and need to know if the bus has gone past lately. The problem is that you can only ask him one question only, then based on his answer you find out if you have missed the bus or not.

Problem:
What do you ask him?


BTW:He is not waiting for a bus.
if I asked your brother if the the bus had gone past what would he say?

AnthonyGerrard
02-21-2011, 06:07 AM
If I was holding that interview, I wouldn't be interested in whether you could write a sorting algorithm from the top of your head. A tool for my business would have been written for that long ago.

I would be more interested in what tools you had developed to save time and money. Have you used Entity Framework, linqtosql etc etc.

Questions like you underwent underline that these people don't actually know what they want. They are just questions designed to filter down a large number of candidates, nothing more.

I'll tell a story...

Once a company had to develop a template system for different emails in .net. The brightest member of the inhouse team came up with an object with properties for each section of the email which was then saved to xml. To change the properties of the email, you had to open the xml file, amend the html of the appropriate property and save and reupload. Ugly as hell but the team member could probably answer the type of questions you mentioned.

I then had to spend time coming up with an alternative. Using a .net user control with a data object assigned to it which was then dynamically loaded on request. The solution was a tool that saved time and money and instantly relegated the other solution to the trash.

If an interviewer has no interest in using tools to complete a task then tell him to go build a car with his bare hands.

If I was interviewing you and you told me how to save time and money, you would have my attention but unfortunately the people doing the interviews don't usually care about this. They prefer to stroke their own egos with arbitrary questions that have nothing to do with what the owners really want.

I would have to completely disgaree - someone applying for this type of work - should have the basic programminng knowledge to produce the functions required. They are hardly more than a step above pure beginner. So asking someone to write that out is far game - frankly anyone who couldn't , asking for a programming job with experience , well - I'd steer clear. As for these functions already exist , why would anyone want to recreate them - thats beside the point - at the end of the day - the question was to create a couple of simple functions. We are not seriuosly suggesting the company just wanted that solution!?

The hard bit was doing them under pressure when surprised with it in an interview, maybe explaining technical things under pressure is part of the job. And we will all know for next time.

To complain about these type of questions - seems odd - after all for the job shouldn't you be able to do them. And if you can do them aren't you glad they weeded out all the bullshitters who cant. -

and I have seen some fantastic looking CVs - in well paid jobs, who couldnt have done those questions without the internet, would probably have taken them a day. But couldn't actually do it themselves, or make small alterations to make a generic function - which is available to all into a bespoke one - which may actually be called for.

dan-cat
02-21-2011, 07:10 AM
It doesn't matter whether you can write an algorithm instantly.

What matters is that you can write one ONCE and carefully over a considered time. Then apply it to an environment where it can be reused effectively and efficiently. The first part is useless without the second. If you think the second part is besides the point then I don't want you anywhere near my frameworks.

I wouldn't want my coder to write code and design frameworks under pressure. They will turn out crap. I want considered, robust work that has accessible and practical use.

The company is still using VB6, no longer supported by over two years, instead of the fifth generation of its successor probably because it has no concern with efficient design.

AnthonyGerrard
02-21-2011, 07:24 AM
It doesn't matter whether you can write an algorithm instantly.

What matters is that you can write one ONCE and carefully over a considered time. Then apply it to an environment where it can be reused effectively and efficiently. The first part is useless without the second. If you think the second part is besides the point then I don't want you anywhere near my frameworks.

I wouldn't want my coder to write code and design frameworks under pressure. They will turn out crap. I want considered, robust work that has accessible and practical use.

The company is still using VB6, no longer supported by over two years, instead of the fifth generation of its successor probably because it has no concern with efficient design.

You have a nice job - ie one with no pressure, and you are able to use whichever latest technology is available.

Most jobs aren't like that. Of course efficiency is important, but so is basic progamming ability- with which to work effiiency into.

Banana
02-21-2011, 07:35 AM
The company is still using VB6, no longer supported by over two years, instead of the fifth generation of its successor probably because it has no concern with efficient design.

Mind clarifying? You mean your company has no concern with the efficient design or successor to VB6 has no concern with efficient design?

AnthonyGerrard
02-21-2011, 07:51 AM
Mind clarifying? You mean your company has no concern with the efficient design or successor to VB6 has no concern with efficient design?

I think he meant the use of VB6 showed little concern for efficiency - thats what I understood anyway - which is why I thought it a little of an idealist, rather than realist expectation, not to be using VB6.

dan-cat
02-21-2011, 09:15 AM
Mind clarifying? You mean your company has no concern with the efficient design or successor to VB6 has no concern with efficient design?

I was saying that a company who still uses VB6, expects candidates to pull algorithms from memory and who is offering low pay, probably has no idea what skills are required and what contemporary tools are available to produce good design. The questions were probably pulled off some website.

Nothing wrong with VB6, just that it's successors have moved on 5 generations.

dan-cat
02-21-2011, 09:37 AM
I think he meant the use of VB6 showed little concern for efficiency - thats what I understood anyway - which is why I thought it a little of an idealist, rather than realist expectation, not to be using VB6.

I think you'll find that it is actually the reverse. With the extreme pace of technological progress, it is actually more realistic to not expect candidates to hold the required processes in memory but to expect them to use tools to harness them well.

ChrisO
02-21-2011, 10:07 AM
Another possibility is that they did not want to employ a 55 year old person.

As illogical as it may seem, experience can be a drawback.
Some department managers may feel threatened by people older than themselves.
They may feel that they can not control an older person as easily as they could someone younger.

Who can say if each candidate would get the same questions?

Chris.

Uncle Gizmo
02-21-2011, 10:15 AM
I think you'll find that it is actually the reverse. With the extreme pace of technological progress, it is actually more realistic to not expect candidates to hold the required processes in memory but to expect them to use tools to harness them well.

What an excellent observation their!

I am currently reading a book on extreme programming and in essence it says build something small often, released often, rebuild it often, build in small independent chunks, really it just confirms what I already do, in other words my suspicion is extreme programming is a manifestation of what programmers want, not what is dictated to them how they should do it by cerebral university dons who have never done any serious programming in their lives.

Anyway I digress as usual, following on from this excellent observation, the Internet gives you access to much information, and particularly in the programming environment, the information is updated regularly, information where you get feedback automatically as in posting questions in forums and the like. In other words the web is a bit like an interactive book.

My father employed “fitters” these were skilled engineers who had served long engineering apprenticeships and had several years’ experience. Having employed many different fitters over the years my father came to the conclusion:
The difference between a good fitter and a bad fitter, a good fitter knows when to ask. A bad fitter is a fitter who says I’m a good I'm clever, I will just carry on and it will be all OK! Basically like what was said earlier weed out the bull shitters.

AnthonyGerrard
02-22-2011, 12:49 AM
I think you'll find that it is actually the reverse. With the extreme pace of technological progress, it is actually more realistic to not expect candidates to hold the required processes in memory but to expect them to use tools to harness them well.

Thats exactly what I said you said - and I half disgree with. Fine yes obviuosly use the correct tools.

But being asked to quickly write out a function to do factorials is hardly holding anything in memory except basic programming knowledge, which for someone with experience - I think is fair.

dan-cat
02-22-2011, 05:24 AM
But being asked to quickly write out a function to do factorials is hardly holding anything in memory except basic programming knowledge, which for someone with experience - I think is fair.

This is what I'm trying to tell you and what you are not accepting.

Anyone WITH EXPERIENCE will have been asked to do this a thousand times and thus would have written a tool to automate the process. You write the tool SO YOU DON'T HAVE TO REMEMBER. Software developers are confronted with PHP, C#, JAVA, VB.NET, CSS, ActionScript, Javascript, AJAX, XHTML, JQUERY, XML, SOAP, OAUTH, HTTP and any number of API's that Paypal, Facebook, Twitter, Google etc decide to release. It is NOT realistic to remember specific algorithms in memory when confronted with this huge array of interfaces that you need to be familiar with.

There's no way my brain can instantly remember how to do anyone of the processes that I've written tools for. That's why the tools were written in the first place. How to write a bubble sort is a distant memory for me though I could probably quote any Facebook API method from the top of my head. This in turn will be removed from muscle memory when it is time to learn HTML5.

This is why your criteria for what defines a beginner is flawed. Someone who can write a bubble sort algorithm hasn't forgotten yet. They either are not long out of Uni or are still rewriting it each time they get asked to sort something.

The interviewer by giving you notepad and picking an algorithm (not a function) for you to write from the top of your head as a defining criteria has no understanding of what an EXPERIENCED coder HAS TO DO to retain and adapt their abilities for the fast paced software world. A company using VB6 as opposed to .NET 4.0 which is FREE is just a supporting argument of how out of touch they are.

I have been able to learn these new technologies, which are free and accessible to all, by archiving how to do a bubble sort. This is what neither you nor the interviewer understands.

AnthonyGerrard
02-22-2011, 06:03 AM
I can't quite beleive what I am reading -

An experienced coder should be able to write a factorial function - or sorting function off the top of their head.

The fact they dont have to day in day out or ever - is not the point.

They should have the skills to be able to so, should they not?
The interviewer merely asked the interviewee - to show those skills under a bit of pressure.


What you fail to understand is that neither me - nor the interviewer wants to hire someone - who is forced to look up, how to produce the simplest of functions. One which you say they would have produced a thousand times similarly - if that was the case - they should be able to demonstate it. How can your forget something so basic youve done so often. (I understand the interview pressure element)

Are you telling me you are happy to hire a coder who can't write down from the top of their head a factorial function? If they cant do that - how do they produce more complex functions that they can't just look up?


I would not be - as for only beginners being able to do that? Its so basic - that its the building blocks of much coding!

Again - your criticising the company for which technologies they are using! The fact is they want VB6 for what ever reason - they dont necessily want some flash harry - who lists all the latest technologies - but cant write a factorial function.
And youre continueing to pretend anyone who asked you to demonstate how to write a basic function - lacks the knowledge to know that the function doesn't need to be witten every time its needed. Which is a pathetic line of argument.

Uncle Gizmo
02-22-2011, 06:16 AM
Which is a pathetic line of argument.

I should be careful making things personal if I were you, I and I am sure many others here are quite capable of responding in kind. If this were to happen, then things would quickly deteriorate into something akin to a flame war which is of no benefit to anyone.

When I was at school many years ago, I learnt how to calculate the area of a circle, the volume of sphere, all sorts of useless formulas which I have never had a need to visit ever again.

When I first started business, telephones did not store telephone numbers, you had to memorise them, I think I memorised at least 20 or 30 numbers, now today my mobile phone stores every number imaginable. I can’t remember phone numbers to save my life, I don’t even know my own mobile number!

The fact that "I can" look things up instantly, means I don’t have to remember it, and I think you can possibly see where I’m going with this, there’s no need for me to remember the formula for the volume of the sphere, I will just look it up when needed.

It doesn’t detract from me, I am quite capable of working out how to calculate the volume of a sphere from first principles. Well, I like to think I am!

AnthonyGerrard
02-22-2011, 06:26 AM
I should be careful making things personal if I were you, I and I am sure many others here are quite capable of responding in kind. If this were to happen, and then things would deteriorate into something akin to a flame war which is of no benefit to anyone.
When I was at school many years ago, I learnt how to calculate the area of a circle, the volume of sphere, all sorts of useless formulas which I have never had a need to visit ever again.
When I first started business, telephones did not restore telephone numbers, you had to memorise them, I think I memorised at least 20 or 30 numbers, now today my mobile phone stores every number imaginable. I can’t remember phone numbers to save my life, I don’t even know my own mobile number!
The fact that I “can “looking up instantly, means I don’t have to remember it, and I think you can possibly see where I’m going with this, there’s no need for me to remember the formula for the volume of the sphere, I will just looking up when I needed.
If it doesn’t detract from me, I am quite capable of working out how to calculate the volume of the sphere from first principles. Well, I like to think I am!

I didn't make it personnel - I said the argument was pathetic - beacuse we all know the interviewer, was looking for the ability to write simple functions - not someone who was actually going to write simplistic functions over and over again.

I'm not sure what the ability to remember telephone number - or mathematical formula has to do with a coding job.

But I bet if you were going for a job as a mathematician - they may ask you for the formulas - expecting you to be able to develop them, even if you had forgotten them.

Unless - we go down the pathetic argument route that any organisation requiring a mathematician who asks this - obviuosly doesn't know you can just look up the formulas and so doesnt know what they are doing?

vbaInet
02-22-2011, 06:35 AM
You will get this sort of argument when it comes to Visual Basic. It all depends on your background.

If you come from a core programming background, i.e. the likes of C, Java or those with knowledge of older languages, i.e assembly, fortran, cobol etc... then these sort of questions are expected and you are expected to know how to write certain algorithms without the aide of an IDE. For example, if you code in C, you will have learnt how to code in notepad and compile it in command prompt.

VB6 on the other hand is a much easier programming environment and you will find that quite a lot of VB6 programmers use it as a stepping stone to learning core languages. Considering the environment VB6 provides, most VB6 programmers hardly come acoss the need to write Bubble Sort-like algorithms, so in my opinion it is was a bit unfair to ask a VB6 programmer to do so. But bear in mind, there could be more to the Job Description that we don't know about which may justify why this sort of question was asked.

Edit: This seems to be a hot thread. Good job David :D

Adam Caramon
02-22-2011, 07:08 AM
I'd agree that it seems the interviewer was trying to narrow down the pool of applicants. The focus should be on increasing profits for a company or reducing costs, not minutiae.

It actually reminds me of an accounting class I took once. On the first day as we were learning the basics I asked the professor why we needed to know how to do it by hand when there were computer programs that did the work for you.

He said that he agreed, and while he thought it was important to know the basics, to understand what the computer was doing, he thought it was silly to expect people to learn the old method when no one used that method anymore. But he said the school was paying him to teach the old method, so that's what he would teach.

If you can manage the books using a software program (and a free one at that), should you really need to be able to demonstrate in-depth knowledge of what is going on behind the scenes?

If it boosts your confidence at all, from my time on the forums it is quite obvious to me (and I imagine many others) that you are quite adept with Access, SQL, and VB (and I imagine more beyond).

Best of luck.

dan-cat
02-22-2011, 07:31 AM
How can your forget something so basic youve done so often.

You're not reading what I'm posting. Don't worry about it.

jamesmor
02-22-2011, 07:35 AM
Thats exactly what I said you said - and I half disgree with. Fine yes obviuosly use the correct tools.

But being asked to quickly write out a function to do factorials is hardly holding anything in memory except basic programming knowledge, which for someone with experience - I think is fair.

I have to agree with dan-cat on this one.

In my experience, employers who understand the job aren't worried about you actually being able to write functions then and there. They are worried about your ability to solve problems.

Like I've always said, give me a choice between 100 code monkeys or 1 guy who can think critically, and I'll take the 1 guy any day of the week and twice on sunday.

AnthonyGerrard
02-22-2011, 07:42 AM
You're not reading what I'm posting. Don't worry about it.

Anyone WITH EXPERIENCE will have been asked to do this a thousand times and thus would have written a tool to automate the process.

Yes - I see what you mean now - when they were fisrt asked to write a factorial function - you mean they archived it - and reused 999 times?

I thought you meant someone with experience would have written some kind of basic loop a thousand times. Which I would have thought they would have - so it still stands - if you have to look up how to write a function which requires a basic loop, theres something amiss for a lot of jobs surely?
(even though I did misunderstandwhat you wrote)

AnthonyGerrard
02-22-2011, 07:44 AM
I have to agree with dan-cat on this one.

In my experience, employers who understand the job aren't worried about you actually being able to write functions then and there. They are worried about your ability to solve problems.

Like I've always said, give me a choice between 100 code monkeys or 1 guy who can think critically, and I'll take the 1 guy any day of the week and twice on sunday.

Which is why the interviewer was asking for both a coder and a problem solver?

Ie solve the problem of working out factorial - by writing a function - or the other questions he asked. He wasn't after a memory test was he. I doubt it .

vbaInet
02-22-2011, 07:53 AM
I'd agree that it seems the interviewer was trying to narrow down the pool of applicants.Most likely!

He said that he agreed, and while he thought it was important to know the basics, to understand what the computer was doing, he thought it was silly to expect people to learn the old method when no one used that method anymore.I've never been in a VB6 beginners class but I don't imagine the tutor going into too much detail on sorting algorithms. They may just be mentioned and maybe one or two algorithms put to use. I think this really is the essence of VB6 - making programming easy so you don't have to worry about the intricacies.


If you can manage the books using a software program (and a free one at that), should you really need to be able to demonstrate in-depth knowledge of what is going on behind the scenes?In the case of VB6 it would depend on personal interest. In C, where you have to manage memory allocation and the works, it would be worth knowing the ins and outs.

If it boosts your confidence at all, from my time on the forums it is quite obvious to me (and I imagine many others) that you are quite adept with Access, SQL, and VB (and I imagine more beyond).Just a hack Adam :p I'm from a different background.

vbaInet
02-22-2011, 07:55 AM
Which is why the interviewer was asking for both a coder and a problem solver?A hard one really, as we don't know the contents of the Job Description.

AnthonyGerrard
02-22-2011, 08:06 AM
A hard one really, as we don't know the contents of the Job Description.

No we dont - but for almost any VB6 job - I dont think he asked anything unreasonable. - the sort maybe - but nones said he wanted a spot on, perfect answer. He maybe just wanted rid of the complete blaggers.

A bit of basic coding, a basic aptitude problem solving question and a bit of SQL. About the only complaint - would be that it was asked to be done as he watched over you, but there may have been good thiinking behind that too.

Lets take the there are tools to do this for you to the SQL question - I suppose the JOIN question was inappropriate too because - in Access say -theres a wizard which will write that for you?

I'm not having a go at the original poster - cos I would have struggled when put on the spot - but frankly would have expected to have a good go at the questions with a few minutes, in a differant room, and dont think the questions unfair - or pointless.

smig
02-22-2011, 08:21 AM
I have to agree with dan-cat on this one.

In my experience, employers who understand the job aren't worried about you actually being able to write functions then and there. They are worried about your ability to solve problems.

Like I've always said, give me a choice between 100 code monkeys or 1 guy who can think critically, and I'll take the 1 guy any day of the week and twice on sunday.

I totaly agree with that.
I think it's not importent if you remember a specific function, either you done it many times or never done it before. it's importent how you try to solve it, how you think of this question. What I like to call "Can you Think out of the box"
If you do 100 times exactly the same you will end up 100 times with the same result. you will never get a better one.

vbaInet
02-22-2011, 08:23 AM
No we dont - but for almost any VB6 job - I dont think he asked anything unreasonable. - the sort maybe - but nones said he wanted a spot on, perfect answer.It was the sort I was stressing as being a bit harsh. Apparently, the scale was low too. :eek:

Lets take the there are tools to do this for you to the SQL question - I suppose the JOIN question was inappropriate too because - in Access say -theres a wizard which will write that for you?The SQL question was easy so I would imagine, for this to be asked, there would be some SQL server implementation involved in the job.

I'm not having a go at the original poster - cos I would have struggled when put on the spot - but frankly would have expected to have a good go at the questions with a few minutes, in a differant room, and dont think the questions unfair - or pointless.I know you're not and I think he would have done his best.

dan-cat
02-22-2011, 08:48 AM
Yes - I see what you mean now - when they were fisrt asked to write a factorial function - you mean they archived it - and reused 999 times?

I thought you meant someone with experience would have written some kind of basic loop a thousand times. Which I would have thought they would have - so it still stands - if you have to look up how to write a function which requires a basic loop, theres something amiss for a lot of jobs surely?
(even though I did misunderstandwhat you wrote)

Last try lol.

Look I understand your point but here's mine.

They didn't ask for a basic loop. They asked you for the understanding of how a sort array ACTUALLY works. ie. Do you use bubble, insertion etc etc and to have the mechanical understanding of that accessible instantly without IDE and then code it.

If you can't do a For i as integer = 0 to x.count -1 in notepad, then I agree but that wasn't what was asked for.

I don't need a refresher on a basic loop because yes, for my sins, I have to do that everyday. But I quickly had to google the insertion method for sorting to refresh myself of the mechanics of it, from there I was good to go.

My brain couldn't pull the insertion method of sorting because it was 'archived' long ago. If I had to keep re-coding that algorithm daily instead of encapsulating it within a single method I could have answered the question but I wouldn't have got anything done in the past x amount of years.

It was a deliberately tough question to cut down the numbers. It would have culled me but then I don't care to memorize all the mechanics of every single algorithm ever written for the reasons I've stated.

dan-cat
02-22-2011, 09:14 AM
By the way. He didn't want your 2 alternative solutions to the bucket problem because that wasn't the answer on the piece of paper he'd been given.

If you gave me an alternative solution to a long-existing problem, I'd be all ears. Shows a rare commodity, creativity.

EDIT: here's my solution to the bucket problem.

Fill big and pour in small
Leaving 2 in big
Empty small and pour 2 from big into small
Mark small water level
Empty big and pour 2 from small into big.

Refill small to mark and repeat.

Never repeat the 1st four steps again.

DCrake
02-22-2011, 10:09 AM
Quite a number of years ago one of my staff came in with a maths question that was given out a homework from the junior school. I have even set the task to plenty of so called mathamaticians to come up with the FULL solution.

Take a look at the attached spreadsheet for the layout of the question. But basically there are 20 questions numbered 1 - 20 and coincidently the answer to each question is 1 - 20. Therefore the anwer to question 1 is 1, likewise the answer to question 16 = 16. All you have to do is to fill in the mathmatical symbols betwen the numerators so that the question number equals the answer.

Adam Caramon
02-22-2011, 10:56 AM
All you have to do is to fill in the mathmatical symbols betwen the numerators so that the question number equals the answer.

I'm assuming you have to be able to use paranthesis to control the order of operations. If not, I'm totally lost. Even with, I'm not able to get 10, 11, 13, 14, 18, 19. Unless you're allowed to use variables? (is a variable considered a mathmatical symbol?)

If you can use variables, then it would be a lot easier.

DCrake
02-22-2011, 11:05 AM
You need to use BODMAS and only use mathmatical symbols

PS 50 rep points for the first correct answer.

GaryPanic
02-22-2011, 12:02 PM
I looked at the bucket problem -


5 pour into 3 leaves 2
empty 3 put 2 into 3 (this leave 1 gallon short of the three ) then fill 5 up and pour into 3 (5-1 =4)

took a couple of mins to figue it out

or alternaively

fill both buckets up tilt to 45% half the water falls out
1.5 plus 2.5 = 4

(not sure if anyone had type up the answer)

as to the other logic problems - failed miserable .

If you get he job - Great - if you dont..F*%k em' -their loss

Galaxiom
02-22-2011, 12:58 PM
Actually David. What did you get wrong in the factorial test? As Anthony said it isn't a very difficult task.

Sounds to me like it must have been a bad case of interview anxiety.

vbaInet
02-22-2011, 01:16 PM
Quite a number of years ago one of my staff came in with a maths question that was given out a homework from the junior school. I have even set the task to plenty of so called mathamaticians to come up with the FULL solution.

Take a look at the attached spreadsheet for the layout of the question. But basically there are 20 questions numbered 1 - 20 and coincidently the answer to each question is 1 - 20. Therefore the anwer to question 1 is 1, likewise the answer to question 16 = 16. All you have to do is to fill in the mathmatical symbols betwen the numerators so that the question number equals the answer.Ooo I like this. Is repetition allowed? Or you must use only four set of 4s as given?

Edit: I guess you can't because you're filling in the missing symbols:rolleyes:

DCrake
02-22-2011, 01:18 PM
Not being a mathamatician only a bricklayer (give me the plan and I will build it)

I was vaugely familiar with the definition of Factorial, now remember I am 55 and never written a program in my life where I needed to use Factorial I have never come across the written word. But from the recesses of my brain I remembered something about it being multiplied by every number below it.

This was my initial attempt

Public Function Factl(N As Long) As Long

Dim x As Long
Dim F As Long
For x = N To 0
F = F + x * x - 1
Next

Factl = F

End Function

But all he kept saying was look at the question.... Where is the plus sign


Question Being

Factorial = 5*4*3*2*1 = 120

Now bear in mind he did not show me this until I had written the above example.

If he had asked me to examine some convoluted SQL and said how could I improve that, or spot the deliberate mistake, then I think I would have fared better. But hey, life is not like that.

ChrisO
02-22-2011, 01:29 PM
Factorial = 5 * 4 * 3 * 2 * 1 = 120

Does not return the Factorial of 5 it returns -1.

Interviewer failed the test.

DCrake
02-22-2011, 01:43 PM
5! = 5 * 4 * 3 * 2 * 1 = 120

I think was the exact text, But 5 * 4 = 20 * 3 = 60 * 2 = 120 * 1 = 120

So I agree with the answer

DCrake
02-22-2011, 01:46 PM
However after seaching this site for almost 20 seconds I came up with this

Public Function Factorial(N As Long) As Long

If N < 0 Then
MsgBox "invalid argument for Factorial"
Exit Function
ElseIf N < 2 Then
Factorial = 1
Exit Function
End If

Factorial = N * Factorial(N-1)
End Function

ChrisO
02-22-2011, 01:47 PM
Depends how we write it: -


Sub TestIt()

MsgBox Factorial()

End Sub


Function Factorial() As Long

Factorial = 5 * 4 * 3 * 2 * 1 = 120

End Function

DCrake
02-22-2011, 01:48 PM
Chris

See #102

ChrisO
02-22-2011, 01:56 PM
My answer was with regard to: -

Question Being

Factorial = 5*4*3*2*1 = 120

In post #99

Just having a bit of fun David, it is rather hard to ask a question when someone wants to screw with the answer. :D

Galaxiom
02-22-2011, 02:00 PM
fill both buckets up tilt to 45% half the water falls out

This would require a bucket with no taper which is very rare.

DCrake
02-22-2011, 02:01 PM
The big problem is that you cannot take the P**S out of S**T

ChrisO
02-22-2011, 02:03 PM
I went to an interview on one occasion and was asked: -

Do you mind if I ask how much you got in your last job?
No.
(Long pause.)
Well, how much did you get in your last job?
Do you mind if I don’t tell you?

I didn’t get the job but it had nothing to do with my ability to do the job.

If an employer has little regard for the privacy of my previous employer then what would they expect from me in my next interview?

DCrake
02-22-2011, 02:17 PM
I share your opinion on that subject. Especially when the salary is to be dicussed at interview.

They have a figure in mind, and so do you.

Lets say it's £40k a year

Interviewer "And what salary are you looking for?"

Interviewee "Err... About £35k " (Really wants more but scared of asking or willing to be agrued down to £30k)

Inteviewer (To themselves) "Hey I will offer him £34k and we save £6k"

Interiewer "Well the highest we had in mind was £34k..."

I always ask them to make the opening gambit. If they ask what I was on in my previous job I always say that it does not have a bearing on this job.
And as my previous employer has a company policy that all ex employees do not divulge such information I have to honour that. If they really want to know then they should contact my previous employer direct.

To me this shows loyalty to my previous employer even if I have left the Company or about to leave. If they wanted such openness about salaries why was their positions salary to be discussed at interview?

vbaInet
02-22-2011, 02:48 PM
Quite a number of years ago one of my staff came in with a maths question that was given out a homework from the junior school. I have even set the task to plenty of so called mathamaticians to come up with the FULL solution.

Take a look at the attached spreadsheet for the layout of the question. But basically there are 20 questions numbered 1 - 20 and coincidently the answer to each question is 1 - 20. Therefore the anwer to question 1 is 1, likewise the answer to question 16 = 16. All you have to do is to fill in the mathmatical symbols betwen the numerators so that the question number equals the answer.
Here you go David.

Quite an interesting exercise.

ChrisO
02-22-2011, 03:16 PM
David.

Yep, and I was almost certain I didn’t have the job as soon as he asked the question.

There was no way I was going to answer that question so I stuck it to him in like kind.
If they have such little regard for my previous employer then they are likely to have little regard for me. The only way I would accept that position was if he apologized for asking the question and I couldn’t see that happening.

Besides, it didn’t really matter. I had already applied for another job and that was the one I wanted. I got that job but, strangely enough, salary was not even mentioned at the time. It wasn’t mentioned for a week or more, I guess when they needed to make up the pays they realised they didn’t have a figure, and only then was I asked to see the branch manager. He asked me how much I was expecting to get paid. I told him I was not particularly concerned but didn’t think the company could pay me much more or much less than what I would get doing a comparable job elsewhere.

So I told him I would leave it up to him to come up with a number, and I was pleasantly surprised.

It was the best job I’ve had, learnt a lot, and the best paid too. I worked for them for 8 years and I think I would still be working for them if they hadn’t pulled out of Australia for financial reasons.

But that was in the eighties and things have changed…

Chris.

ChrisO
02-22-2011, 03:58 PM
Here is another angle on the topic even though it is not really related to a job interview but more to a safety induction on an open cut mining site. This happened to me about ten years ago…

Old site safety officer who is just about to retire…
How long have you been working in heavy industry?

Me…
About 40 years.

Safety officer…
Still got ten fingers and ten toes?

Me…
Yep.

Safety officer…
Well it seems you have been doing something right.



What this and my previous post means, and will become more and more obvious over time, is that there should be a mutual respect between interviewer and interviewee.

It is not a one-way street in which either party treats the other dissimilarly.

Chris.

Uncle Gizmo
02-22-2011, 04:14 PM
It is not a one-way street in which either party treats the other dissimilarly.

Exactly ....

Rabbie
02-22-2011, 11:04 PM
And as my previous employer has a company policy that all ex employees do not divulge such information I have to honour that. If they really want to know then they should contact my previous employer direct.


However in the UK when you change jobs your new employer can see from your P45 what you were being paid by your old employer

DCrake
02-22-2011, 11:48 PM
Yes but not untill after you get the job and agreed a salary.

AnthonyGerrard
02-23-2011, 01:13 AM
Last try lol.

Look I understand your point but here's mine.

They didn't ask for a basic loop. They asked you for the understanding of how a sort array ACTUALLY works. ie. Do you use bubble, insertion etc etc and to have the mechanical understanding of that accessible instantly without IDE and then code it.

If you can't do a For i as integer = 0 to x.count -1 in notepad, then I agree but that wasn't what was asked for.

I don't need a refresher on a basic loop because yes, for my sins, I have to do that everyday. But I quickly had to google the insertion method for sorting to refresh myself of the mechanics of it, from there I was good to go.

My brain couldn't pull the insertion method of sorting because it was 'archived' long ago. If I had to keep re-coding that algorithm daily instead of encapsulating it within a single method I could have answered the question but I wouldn't have got anything done in the past x amount of years.

It was a deliberately tough question to cut down the numbers. It would have culled me but then I don't care to memorize all the mechanics of every single algorithm ever written for the reasons I've stated.

For the Factorial question - he did pretty much ask for a basic loop.

I dont think he wanted you to remember it - like it would be pointless asking the bucket question - if someone had comitted it to memory - but couldn't answer a variant with differant number attached.

Memorizing it was not the point - having the nouse to work out the answer was.

As I say I have seen a good few people - in well paid jobs , with qualifications, technologies previuos relevent experience a plenty on the CV - working as programmers, DBAs etc etc - they would have been culled by these questions even if they had a day , and maybe even the tinterweb too.
(Mutiple choice questions , and resits of Microsoft certifications are a dangerous thing)
Perhaps culling them was the point.

How else would you suggest finding out such candidates?

I think , to have good go at pseudocoding almost any function you use would be a good idea.

Thales750
02-23-2011, 06:29 AM
Well I think I would have told him to get lost!

I don’t think I would have put it quite that bluntly, but that’s the general attitude I would have taken. You were attending an interview for an MS access job, not to see if you would be any good in the pub quiz team!

Let me ask you an intelligence question I once heard:
A small boy he lives in a block of flats, when he goes to school in the morning he takes the lift, when he comes home at night, he takes the lift and stops at the fourth floor, then takes to the stairs to complete his journey home. Why?

What's a flat and what's a lift?
A lift sounds like an elevator.
And a flat sounds like a one story building.

AnthonyGerrard
02-23-2011, 06:31 AM
What's a flat and what's a lift?
A lift sounds like an elevator.
And a flat sounds like a one story building.

A flat is the old name for a luxury apartment.

DCrake
02-23-2011, 06:37 AM
A flat is a dwelling place that is all on one level (most of the time) that is part of a larger house of multiple occupancy. High rise multi story appartments can also be ferred to as Flats. But the terminaology is insignificant if you have some semblence f what they are talking about.

Uncle Gizmo
02-23-2011, 07:02 AM
dwelling place that is all on one level

Yep that's about it..

http://t3.gstatic.com/images?q=tbn:ANd9GcSoO0cW1TzFGwbkQEQDSYKpguM4clPtd k-OPv26rpNjkCmfAJZR


Lift = Elevator

AnthonyGerrard
02-23-2011, 07:13 AM
Yep that's about it..

http://t3.gstatic.com/images?q=tbn:ANd9GcSoO0cW1TzFGwbkQEQDSYKpguM4clPtd k-OPv26rpNjkCmfAJZR


Lift = Elevator

Where di you get that picture - I wonder if they are still standing. I suppose something like 70% of the flats locally to me - have been pulled down and replaced with houses.

vbaInet
02-23-2011, 07:20 AM
Where di you get that picture - I wonder if they are still standing. I suppose something like 70% of the flats locally to me - have been pulled down and replaced with houses.Quite a lot of them are still standing in London. They look very much like Council flats.

Uncle Gizmo
02-23-2011, 07:21 AM
>>>Where di you get that picture<<<

I searched Google Image Search:

For "Flats" http://www.google.co.uk/advanced_image_search?hl=en

AnthonyGerrard
02-23-2011, 07:21 AM
Quite a lot of them are still standing in London. They look very much like Council flats.

Housing association surely?

Uncle Gizmo
02-23-2011, 07:23 AM
These are also "Flats"


http://fashionistaguide.com/wp-content/uploads/2010/08/Flats.jpg

Uncle Gizmo
02-23-2011, 07:25 AM
This is "Mud Flats"

http://www.cotswoldauction.co.uk/Portals/1/01-2011/02-18-Ci-Pict-Ant-Int/Manuel%20Khristoforovich%20Aladjalov%201862-1934%20Landscape%20sketch%20with%20mud%20flats%20a nd%20small%20stone%20building,%20unsigned,%2021%20 x%2027cm,%20est.%20%C2%A380%20-%20%C2%A3120_640x480.jpg

AnthonyGerrard
02-23-2011, 07:26 AM
>>>Where di you get that picture<<<

I searched Google Image Search:

For "Flats" http://www.google.co.uk/advanced_image_search?hl=en

I kind of knew that - was just remarking that the picture seemed old (black and white) and wondered if they were still standing.

Is that a chimney I see in the background? Ah the good old days of Blighty - chimneys , flats and crap white sliced loaves.

Uncle Gizmo
02-23-2011, 07:28 AM
These are "Salt Flats"

http://www.mountaininterval.org/photos/images/b19-roll/12-death-valley-badwater-salt-flats.jpg

vbaInet
02-23-2011, 07:29 AM
Housing association surely?Too big for Housing Association. They won't spend that much on them. Definitely Council buildings and what you see at the top are (most likely) Boilers.

AnthonyGerrard
02-23-2011, 07:40 AM
Too big for Housing Association. They won't spend that much on them. Definitely Council buildings and what you see at the top are (most likely) Boilers.

I'm not sure we still have council houses here? I though they were all privatised into housing associations - many many have anyway.

The chimney I was refffering too (if it is one) is in the background by the hill (mound) . Looks like a milltown circa 1960!

I dont know much about london flats aprt from Nelson Mandela heights - and the estate (was it?) documentray on BBC MOnday nights around 2 years ago - of proper working class flats being "ethnicly cleansed" into luxury apartments.

Googling - It was called "The Tower" 2007

dan-cat
02-23-2011, 07:49 AM
PaulDohert, amirite?

vbaInet
02-23-2011, 07:50 AM
I dont know much about london flats aprt from Nelson Mandela heights - and the estate (was it?) documentray on BBC MOnday nights around 2 years ago - of proper working class flats being "ethnicly cleansed" into luxury apartments.I didn't see the programme :o Some parts of London - mainly East - have had some Council flats converted to luxury appartments and some just transformed but remain as Council flats but with a higher price tag. There are luxury flats dispersed all over London with lots more in the Central parts and the West End.

AnthonyGerrard
02-23-2011, 07:56 AM
There are luxury flats dispersed all over London with lots more in the Central parts and the West End.

These are new builds are they as opposed to council flat conversions you mentioned?

Is flat trendy again? (rather than apartment)

AnthonyGerrard
02-23-2011, 07:57 AM
PaulDohert, amirite?

You may say that - I couldn't possibly comment.

He must be a witty, good natured handsome man, to have that confused anyhow.

vbaInet
02-23-2011, 08:07 AM
These are new builds are they as opposed to council flat conversions you mentioned?

Is flat trendy again? (rather than apartment)Most of them are new builds.

You can say they are trendy but because there's no space, it's become a thing of necessity.

AnthonyGerrard
02-23-2011, 08:11 AM
Most of them are new builds.

You can say they are trendy but because there's no space, it's become a thing of necessity.

Ive seen the dormitory new builds down the river - not highrise - but like student accomodation - where 10s and 10s of thousands if not hundreds of thousands live, but come the weekend you expect tumble weeds, to blow through.

A few years since I've been down to stay though.


Weird.

The_Doc_Man
02-23-2011, 06:24 PM
I see the topic has migrated away from the interviews, but I have a story about a fellow who was looking for an administrative assistant. He had three candidates, each coming from a different field and seeking to change career direction to management.

The manager decided he would test their viewpoints, so he chose a simple question: How much is 2 + 2 ?

The first applicant was an engineer. The manager asked his question. The engineer pulled out his old pocket calculator. In a moment, he said "2 + 2 = 3.99999999995 plus or minus 0.00000000006"

The second applicant was a programmer. The manager asked his question. The programmer said, "I'm not sure, but if you give me two junior coders, a small time-sharing system, and about two weeks to work out the program, I'll have an answer for you at the end of that time."

The third applicant was from a marketing background. The manager asked his question. The marketeer looked him straight in the eye and asked, "What would you like it to be?"

vbaInet
02-24-2011, 12:58 AM
I see the topic has migrated away from the interviews, ...You will have noticed this is my speciality :D


The manager decided he would test their viewpoints, so he chose a simple question: How much is 2 + 2 ?I think the third candidate would get the job because the question wasn't "what is 2 + 2", but "how much is 2 + 2". 2 + 2 can be the name of a product.

Uncle Gizmo
02-24-2011, 01:27 AM
I think the third candidate would get the job because the question wasn't "what is 2 + 2", but "how much is 2 + 2". 2 + 2 can be the name of a product.

I like it... Very Clever Answer...

vbaInet
02-24-2011, 02:32 AM
I like it... Very Clever Answer...Do I get the job then Uncle Gizmo?:)

Uncle Gizmo
02-24-2011, 03:00 AM
Do I get the job then Uncle Gizmo?:)

Yes, you'd get my vote every-time, as would most AWF VIP's.