DCrake
Remembered
- Local time
- Today, 02:28
- Joined
- Jun 8, 2005
- Messages
- 8,632
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.
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.