Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > testing c skills

Reply
Thread Tools

testing c skills

 
 
junky_fellow@yahoo.co.in
Guest
Posts: n/a
 
      04-17-2006
Hi guys,

I want to have your opinion on how a candidate should be judged for
his programming
skills in C ? Should he be checked for his programming basics or should
he be asked to
write a program for some problem (like sorting or searching ) ?

 
Reply With Quote
 
 
 
 
ed
Guest
Posts: n/a
 
      04-17-2006
On 16 Apr 2006 22:42:50 -0700
"(E-Mail Removed)" <(E-Mail Removed)> wrote:

> I want to have your opinion on how a candidate should be judged
> for
> his programming
> skills in C ? Should he be checked for his programming basics or
> should he be asked to
> write a program for some problem (like sorting or searching ) ?


The candidate should be judged on overall ability with other languages
too, I think it shows a strong candidate when he can write in multiple
languages, if this is for the purposes of employment you should consider
if the candidate is aware when C should be used, and when there are
other languages which might fit the purpose better.

If for the purpose of employment you should bias your tests strongly
against the line of jobs that you think the candidate will be
performing, for example if they were to write you a custom email server
you should probably test their ability with general email RFC's, things
such as mime encoding and headers would be of vital importance (along
with many other aspects of safe design).

You might also (if interviewing a very large section of people) take a
look at online tests by people like brainbench.com to see what their
people think are important in the C language.

Or just take a look at the FAQ for some examples of questions.

--
Regards, Ed :: http://www.s5h.net
:%s/\t/ /g :: proud unix system person
:%s/Open Source/Free Software/g
 
Reply With Quote
 
 
 
 
Richard Heathfield
Guest
Posts: n/a
 
      04-17-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) said:

> Hi guys,
>
> I want to have your opinion on how a candidate should be judged for
> his programming
> skills in C ?


Here's one possible strategy:

Start by getting the candidates to write a correct, robust "hello, world" C
program. Most people simply can't do this in a correct and robust manner.
In fact, you can probably eliminate a good (or bad!) 75% of candidates at
this stage.

Once you've done that, ask the remainder to write a program that adds two
arbitrary integers (i.e. integers of any length) supplied as argv[1] and
argv[2], again in a correct and robust manner. For example, the command
line might be:

../add 739346584673839376487584638389 582473839893783736446474874162

Eliminate any candidates whose programs supply incorrect results.

(For the above example, 1321820424567623112934059512551 is the expected
result.)

Then eliminate any candidates whose programs don't handle incorrect input
(at least one argument is either not present or not an integer).

Then look through the programs and decide which candidate's code is the most
readable and robust.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      04-17-2006
Richard Heathfield <(E-Mail Removed)> writes:
[...]
> Once you've done that, ask the remainder to write a program that adds two
> arbitrary integers (i.e. integers of any length) supplied as argv[1] and
> argv[2], again in a correct and robust manner. For example, the command
> line might be:
>
> ./add 739346584673839376487584638389 582473839893783736446474874162
>
> Eliminate any candidates whose programs supply incorrect results.

[...]

Extra points for candidates who ask for clarification on the
requirements. For example, are leading "+" and "-" signs allowed?
Does a leading "0x" or "0X" denote hexadecimal, or is it an error?
Does a leading "0" denote octal or decimal? How should the program
respond to invalid inputs?

Finally, how portable does the program have to be? The simplest way
to do this is probably to use system() to invoke "bc". Next best is
to use GMP (download and install it if it's not already on the
system).

If the solution has to be self-contained portable C, I probably
wouldn't ask someone to solve this during an interview; it's likely to
take too much time that could have been spent talking to the
candidate.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
 
Reply With Quote
 
Flash Gordon
Guest
Posts: n/a
 
      04-17-2006
Keith Thompson wrote:
> Richard Heathfield <(E-Mail Removed)> writes:
> [...]
>> Once you've done that, ask the remainder to write a program that adds two
>> arbitrary integers (i.e. integers of any length) supplied as argv[1] and
>> argv[2], again in a correct and robust manner. For example, the command
>> line might be:
>>
>> ./add 739346584673839376487584638389 582473839893783736446474874162
>>
>> Eliminate any candidates whose programs supply incorrect results.

> [...]
>
> Extra points for candidates who ask for clarification on the
> requirements. For example, are leading "+" and "-" signs allowed?
> Does a leading "0x" or "0X" denote hexadecimal, or is it an error?
> Does a leading "0" denote octal or decimal? How should the program
> respond to invalid inputs?
>
> Finally, how portable does the program have to be? The simplest way
> to do this is probably to use system() to invoke "bc". Next best is
> to use GMP (download and install it if it's not already on the
> system).
>
> If the solution has to be self-contained portable C, I probably
> wouldn't ask someone to solve this during an interview; it's likely to
> take too much time that could have been spent talking to the
> candidate.


I don't think it is tremendously difficult or long. Strip any leading
spaces, check the first character (possibly the second as well to detect
0x), allocate space (remembering the result could be one character
longer than the longest number) then work from the other end of the
strings adding a digit at a time.

Personally, if interviewing, I would be more likely to ask how to solve
certain types of problem, what gotcha's to look out for and about things
they have done in the past.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      04-17-2006
Richard Heathfield wrote:
> (E-Mail Removed) said:
>>
>> I want to have your opinion on how a candidate should be judged
>> for his programming skills in C ?

>
> Here's one possible strategy:
>
> Start by getting the candidates to write a correct, robust "hello,
> world" C program. Most people simply can't do this in a correct
> and robust manner. In fact, you can probably eliminate a good (or
> bad!) 75% of candidates at this stage.
>
> Once you've done that, ask the remainder to write a program that
> adds two arbitrary integers (i.e. integers of any length) supplied
> as argv[1] and argv[2], again in a correct and robust manner. For
> example, the command line might be:
>
> ./add 739346584673839376487584638389 582473839893783736446474874162
>
> Eliminate any candidates whose programs supply incorrect results.
>
> (For the above example, 1321820424567623112934059512551 is the
> expected result.)
>
> Then eliminate any candidates whose programs don't handle incorrect
> input (at least one argument is either not present or not an integer).
>
> Then look through the programs and decide which candidate's code is
> the most readable and robust.


Then make it harder and require that they do the job without
additional storage apart from a few char variables, and possible
recursion effects.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>


 
Reply With Quote
 
Rod Pemberton
Guest
Posts: n/a
 
      04-17-2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi guys,
>
> I want to have your opinion on how a candidate should be judged for
> his programming
> skills in C ? Should he be checked for his programming basics or should
> he be asked to
> write a program for some problem (like sorting or searching ) ?
>


The problem with all testing methodologies is that people have weaknesses in
different areas. When you develop a test, you "discriminate," intentionally
or not, against certain skills and types of intellect. If you test for
intricate knowledge of simple language details, as Heathfield and Thompson
suggested, you may end up with a programmer whose code is correct, but who
struggles to solve bigger problems. If you test for problem solving
ability, you may end up with a programmer who can solve problems elegantly,
but who struggles to implement the code correctly. The programmer may be
strong in one or more of string processing, or databases, or numerical
computation, or DSP algorithms, microcontrollers, but at the same time be
weak in the other areas.

You need to define what your business needs are for that person. What areas
of coding is your business involved in? If you're in finance, do you want
someone who is strong in string processing or databases? You'd probably
want someone strong with numerical computations...


Rod Pemberton






 
Reply With Quote
 
Ian Collins
Guest
Posts: n/a
 
      04-17-2006
(E-Mail Removed) wrote:
> Hi guys,
>
> I want to have your opinion on how a candidate should be judged for
> his programming
> skills in C ? Should he be checked for his programming basics or should
> he be asked to
> write a program for some problem (like sorting or searching ) ?
>

I tend to probe the candidate on a recent project to try to get a feel
for their ability to describe the problem and their solution.

I used to pose programming questions, but after suffering some realy
stupid ones myself I prefer to trust my judgement based on past work.
Once I have a feel for the candidate's perceived strengths and
weaknesses, I'd have one of my team pair with them for and hour to see
how they work on real world problems and more importantly, how well they
fit in with the team.

--
Ian Collins.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
testing testing neville Computer Support 2 05-27-2005 09:57 AM
testing testing 123 daniel edwards Computer Support 4 05-20-2004 10:36 PM
testing--news2004--testing Boomer Computer Support 3 09-24-2003 06:54 PM
Re: Testing employees/interviewee's C++ Skills Shane Beasley C++ 2 09-09-2003 02:37 AM
Re: Testing employees/interviewee's C++ Skills John C++ 2 09-04-2003 06:45 PM



Advertisments