From: Larry Serflaten on 14 Feb 2010 19:25
"C. Kevin Provance" <*@*.*> wrote
> Those were all too easy. Except for the last one of course. I got nothing.
I wanted them easy, on appearance, but the more experience a person has, the
more detailed the answers get. For example:
How many elements does the array have: Dim A(5) As Byte
Some might try to give an answer (6), but it really depends on the Option Base
setting, which the experienced would mention. Or:
List some of the tools the IDE provides to help debug a program.
Some may mention the Debug object, the Immediate window, or the ability
to step through code. More experienced coders might also mention breakpoints,
the call stack, the watch window, etc....
The purpose is to see how much experience the person has. So for the 'easy'
questions the novice would have an 'easy' answer, but the answers from
experienced coders would be more complete....
Now read it again and see if you can give complete answers! ;-)
From: bitshifter on 14 Feb 2010 19:26
I'll add some of those. However, the reason for the test was to filter
out arm-chair programmer from the hands-on one. Code lawyers did not
interest us much.
On Sun, 14 Feb 2010 16:52:15 -0600, "Larry Serflaten"
>> Subject: Ever had to judge a new to-be-hired in interview?
>Some questions that might help show proficiency...
>- What does Option Explicit do?
>- How are dates and times entered into, and stored, in a program?
>- What does For Each do? Where and why would you use it?
>- What are some of the differences between a module, a class, and a form?
>- The VB IDE allows for the addition of References to a project. What are
> references, and what are they used for?
>- A class under development could have a public variable, or a public property.
> How would you choose between the two?
>- What are User Controls used for?
>- Give an example (or two) of where an Enum might be used.
>- What are some of the pros and cons to using a control array?
>- You've created a class that is running amuck. What can you add to the
> program to track when the class gets loaded into memory, and when it
> gets removed from memory?
>- Write a boolean function that will accept a string and report if the following
> combinations are present in the string: "A1B1", "A2B1", "A1B2", "B1B2"
>- List some of the tools the VB IDE provides to help debug a program.
>- Your program often accepts short (less than 10) lists of item names. The
> item names are entered in random order, but must be ouput in sorted order.
> What are some of the methods you could use to produce the sorted lists?
>- Most VB controls have Width and Height properties. Which controls have
> ScaleWidth and ScaleHeight properties, and what are they used for?
>- Under what conditions would you add code to the Form_Paint event?
>- How many elements are there in an array declared: Dim A(5) As Byte
>- What are the steps involved in reading data from a file. Include any
> 'defensive coding' steps you might include to avoid errors.
>- When is it appropreate to use an Error Log?
>- When is it appropreate to use a User Control?
>- Why do you want this job?
From: Bob Butler on 14 Feb 2010 19:42
<bitshifter(a)sympatico.ca> wrote in message
> I'll add some of those. However, the reason for the test was to filter
> out arm-chair programmer from the hands-on one. Code lawyers did not
> interest us much.
I'd consider questions about things like the NewIndex, List and ItemData
properties of the listbox; the RowData, ColData, MouseRow, & MouseCol of the
MSFlexGrid; the common dialog control vs the common dialog API; resizing
forms (+ subclassing); Form QueryUnload/Unload/Terminate/etc; using
WithEvents; createobject vs New and early vs late binding; ....
I just wish the VB.Net designers had had to pass a test on VB before being
put to work.
From: Helmut Meukel on 14 Feb 2010 19:57
as Larry said some amswers are wrong.
The question below and the given answers are especially sloppy.
> What is wrong with this code?
> Dim n as long
> n = 5
> Private MyFunction(byval nVar as integer) as integer
> <Do something fun>
> End Function
> n is a Long, the function calls for an Integer.
> It will work due to VB evil coercion but when the passed value
> exceeds the integer range (32,767 to -32,768), an error "Type
> mismatch" will occurs.
> Extra points:
> If the "byval" is absent from the function definition, then you get a
> compile error Byref type argument mismatch.
If you add the missing keyword Function, the extra points answer is still
wrong: you won't get the compile error if "byval" is absent, due to sloppy
programming in the line
If you past this statement into the IDE, it will slightly correct it to:
Then VB will treat (n) as an expression and happily convert it to
an Integer, if possible.
When caring for the return value it should read
IntRetValue = MyFunction(n)
Due to its use (the function code provides no return value and the calling
procedure dosn't care for a return value) it should be declared as Sub.
The calling sequence would then read
From: Tom Shelton on 14 Feb 2010 21:23
On 2010-02-15, Bob Butler <noway(a)nospam.ever> wrote:
><bitshifter(a)sympatico.ca> wrote in message
>> I'll add some of those. However, the reason for the test was to filter
>> out arm-chair programmer from the hands-on one. Code lawyers did not
>> interest us much.
> I'd consider questions about things like the NewIndex, List and ItemData
> properties of the listbox; the RowData, ColData, MouseRow, & MouseCol of the
> MSFlexGrid; the common dialog control vs the common dialog API; resizing
> forms (+ subclassing); Form QueryUnload/Unload/Terminate/etc; using
> WithEvents; createobject vs New and early vs late binding; ....
> I just wish the VB.Net designers had had to pass a test on VB before being
> put to work.
LOL... So tempting... You realize that in almost every thing you mentioned
..NET makes VB6 look pathetic right?