Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-10-01 Thread Alan Gauld via Tutor
On 01/10/17 22:39, Marc Tompkins wrote:

>>> Probably the best programming test there is look at code
>>> that's already been developed,
>>
>> It is what we did with the bug finding test. 

> My test was, fortunately for me, not a start-from-scratch FizzBuzz problem,
> but debugging a report module that was on the department's "to-fix" list.

I think that's the point, its much easier to use real code in
a debug situation than in a write-something-new type test.
If the code is halfway decent you can figure out what it
does even if you don;t know the libraries - or even, as
in your case, the language!

But if you had been asked to write a new function in that
reporting system (assuming you knew COBOL) that would have
been much harder without knowing the database schema or the
query libraries that existed.

> It took me about twenty-five minutes to find the problem

But here is another problem, when we interviewed folks we
got an hour in total per candidate so if a single exercise
took 25 minutes we would never have had a chance to explore
the other skills they needed. It had to be 10-15 mins max.

The reality is that interviewers need some kind of filter
and there is no perfect one. I've come to the conclusion
that the hire process should work on the basis that you
take someone on for a 3 month trial, its the only real
way to tell if they are any good. But legal and corporate
requirements mean that's unlikely to ever happen.

In the meantime interviewees and interviewers alike struggle
to find a meaningful way to select real talent in a market
where far more unsuitable candidates present themselves than
suitable. I fact often we could not even get enough good
candidates to fill the jobs available.
It typically went like this:

10 jobs
1000 applicants (if it was advertised externally)
100 interviews (run by the HR team)
40 tested (this is where I came in)
8 selected + 2 temporary contractors hired

Over the years we tried lots of different formats but
the end results were always about the same.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-10-01 Thread Marc Tompkins
On Sun, Oct 1, 2017 at 12:48 PM, Alan Gauld via Tutor 
wrote:

> But to address another issue raised by Mats:
> > Probably the best programming test there is look at code
> > that's already been developed,
>
> Very true and in an ideal world what you would do, but...
>
> It is what we did with the bug finding test. But, as alluded
> to by Steve, it's really hard to do this for anything
> significant in an interview, since you would need to be
> familiar with the system's framework and libraries since
> most code consists of calls to libraries.


First off, a confession: I'm an English major, not CS or IT.  But this
conversation reminded me of my interview for (what turned out to be) my
first-ever programming job.  I'd been working as BOFH (operating a
System/360) for a few months, and heard about a better job in an HP shop
closer to where I lived.  So I applied, and during the course of the
interview I discovered that it was a blended position: programming during
the day, operator in the evening.  I kept a poker face, and when I was
asked whether I'd written any COBOL I lied and said yes.  (I knew the name,
but had never seen a line of code - only BASIC and Pascal up to that time.)
My test was, fortunately for me, not a start-from-scratch FizzBuzz problem,
but debugging a report module that was on the department's "to-fix" list.
It took me about twenty-five minutes to find the problem (it was an
off-by-one bug, as I recall), most of which was taken up translating COBOL
to Pascal in my head...  I got the job, and went straight to the local
university bookstore and bought every book I could find on COBOL.  Good
times, good times...
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-10-01 Thread Alan Gauld via Tutor
On 01/10/17 16:09, Steven D'Aprano wrote:

>> The fizzbuzz one is definitely a bit too simplistic, but the one
>> cited by McConnel (reverse a linked list in C) is typical of
>> the kind of question we used. And yes, most candidates failed.
> 

> I would have *no idea* how to traverse a singly-linked list in reverse 
> without making a copy of it first.

The point is you don't need to traverse it in reverse
you simply iterate over it from the first element and
prepend each node. It really is trivially simple - or
should be for anyone purporting to be a C programmer.

And its not about memorizing algorithms - I never would
expect that - its about looking at the problem and
thinking about the solution.

And I should add that I was last interviewing programmers
in the 1990's (for the millennium bug the very last time,
and the code was in COBOL!).

But to address another issue raised by Mats:
> Probably the best programming test there is look at code
> that's already been developed,

Very true and in an ideal world what you would do, but...

It is what we did with the bug finding test. But, as alluded
to by Steve, it's really hard to do this for anything
significant in an interview, since you would need to be
familiar with the system's framework and libraries since
most code consists of calls to libraries. And the candidates
will probably not all be familiar or even aware of such,
so, to level the playing field, you give them a simple but
generic problem, like the fizzbiz or linked list tests.

> ...not nearly all of the important skills of the
> professional programmer are in code

Absolutely, or at least for the software engineer.
There is I believe a big cultural difference between,
say the UK, and the USA in what a programming job
looks like. (I'm less familiar with other countries,
even in Europe)

In the UK a "programmer" is a code monkey who takes
a code spec (flow chart or pseudo code) and turns
it into industrial strength code. It's a low paid
(relatively) position and the programmer probably
does not have any computer related degree, maybe
a craft school diploma. I believe programmer salaries
are currently around £22-25K per annum.

A software engineer can program but is also supposed
to be able to capture and analyze client requirements
produce a top level design/architecture, develop low
level design/spec (possibly for handing to a "programmer")
write the code, test it completely ("programmers" only do
unit tests, not system tests) and write appropriate
documentation. Salaries here range from about £30-60K
per annum depending on experience etc.

When I was interviewing it was always for software
engineers - we only employed programmers in our mainframe
systems. Everyone else was an "engineer".

So I guess expectations for the role might have a
big bearing too.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-10-01 Thread Mats Wichmann
On 10/01/2017 09:09 AM, Steven D'Aprano wrote:
> On Sun, Oct 01, 2017 at 12:04:13PM +0100, Alan Gauld via Tutor wrote:
> 
>> The fizzbuzz one is definitely a bit too simplistic, but the one
>> cited by McConnel (reverse a linked list in C) is typical of
>> the kind of question we used. And yes, most candidates failed.
>>
>> Some of that is interview nerves so we would give them some
>> hints and see if they could find the errors themselves. But
>> some people literally couldn't even start!
> 
> I should think not! It's been about 30 years since I've last needed to 
> reverse a linked list (in Pascal, not C, but the principle is the same). 
> Who does that these days?
> 
> I would have *no idea* how to traverse a singly-linked list in reverse 
> without making a copy of it first.
> 
> Okay, if you're specifically looking for somebody to write low-level 
> algorithmic code, that's one thing. But 95% of programmers spend 95% of 
> their time using library calls. And the remaining time, they certainly 
> don't have to come up with a "reverse this linked list" algorithm from 
> scratch. Google it, or look it up in a book.



My problem with programming tests too.  There's only so much stuff you
can keep in easily accessible memory, and the ability to find snippets
and other answers and make use of them in order to help develop code
efficiently is a more valuable programming skill than memorization of
algorithms! - we're trying not to reinvent the wheel unless we
absolutely have to. (We could go off on a tangent and argue about
software patents here but I'll spare you all that).

Many years ago I had a form of this discussion with my Physicist father,
before computers were a big factor in his field: you needed to
understand how you would arrive at an answer mainly in order to have a
sense of whether something you were going to use was reasonable or off
by orders of magnitude, because in real life you looked things up in the
Rubber Book
(https://en.wikipedia.org/wiki/CRC_Handbook_of_Chemistry_and_Physics)
and other resources. We use google today in much the same way: why
repeat work someone's already done?

So employment-type programming tests often test for something that's not
really part of your day-to-day routine as a programmer.

Probably the best programming test there is look at code that's already
been developed, but it's unfair to assume (as some companies do today)
that a programmer's life's work will be sitting out in the open on
github - that's just not true for everyone/everything, and not nearly
all of the important skills of the professional programmer are in code
either.


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-10-01 Thread Steven D'Aprano
On Sun, Oct 01, 2017 at 12:04:13PM +0100, Alan Gauld via Tutor wrote:

> The fizzbuzz one is definitely a bit too simplistic, but the one
> cited by McConnel (reverse a linked list in C) is typical of
> the kind of question we used. And yes, most candidates failed.
> 
> Some of that is interview nerves so we would give them some
> hints and see if they could find the errors themselves. But
> some people literally couldn't even start!

I should think not! It's been about 30 years since I've last needed to 
reverse a linked list (in Pascal, not C, but the principle is the same). 
Who does that these days?

I would have *no idea* how to traverse a singly-linked list in reverse 
without making a copy of it first.

Okay, if you're specifically looking for somebody to write low-level 
algorithmic code, that's one thing. But 95% of programmers spend 95% of 
their time using library calls. And the remaining time, they certainly 
don't have to come up with a "reverse this linked list" algorithm from 
scratch. Google it, or look it up in a book.



-- 
Steve

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-10-01 Thread Alan Gauld via Tutor
On 01/10/17 06:56, boB Stepp wrote:

> I definitely was *not* looking for a pat on the back.  I just could
> not believe that "FizzBuzz" (Or similar questions.) would ever be
> needed in a job interview for programming/software engineering.  


The fizzbuzz one is definitely a bit too simplistic, but the one
cited by McConnel (reverse a linked list in C) is typical of
the kind of question we used. And yes, most candidates failed.

Some of that is interview nerves so we would give them some
hints and see if they could find the errors themselves. But
some people literally couldn't even start!

Another common ploy we used was to ask the candidate to find
say 2 points of failure in a short function - say 4 or 5 lines
long. And tell me how they'd fix it.

Even fewer candidates can pass that one.

> I truly hope that the above article does not reflect reality!

I think it exaggerates (or maybe things have gotten much
worse in the last 10 years!) but I do think more than half
the applicants we got couldn't really program. (It doesn't
help that many people today think that writing HTML/CSS is
"programming"!)

A final note. The jobs I was interviewing for were all
internal vacancies advertised only within our own IT
department. So all the candidates were already employed
by us as IT people If you advertised externally it
probably would be much worse.


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-09-30 Thread boB Stepp
On Sun, Oct 1, 2017 at 12:32 AM, Steven D'Aprano  wrote:
> On Sun, Oct 01, 2017 at 12:09:55AM -0500, boB Stepp wrote:
>
>> If I understand the problem correctly, this gives the desired result.
>> I would have had this in < 30 seconds if I did not stop at each stage
>> and verified I was getting my expected result.  I don't claim to be a
>> *real* programmer and am definitely no where approaching a
>> professional programmer, but this question seems ridiculously easy!
>
> Congratulations, according to some, you are a better programmer than 99%
> of self-described programmers.

I definitely was *not* looking for a pat on the back.  I just could
not believe that "FizzBuzz" (Or similar questions.) would ever be
needed in a job interview for programming/software engineering.  I
honestly thought that I was missing something.  I know that I have had
some really bad *blooper* moments in the past on this list!

> https://blog.codinghorror.com/why-cant-programmers-program/

I truly hope that the above article does not reflect reality!

> For a dissenting view:
>
> https://www.skorks.com/2010/10/99-out-of-100-programmers-cant-program-i-call-bullshit/

Hopefully this one provides a more accurate picture, though it is not
a rosy view either.

The more I read and study, the more I follow this and the main list,
the more I realize how truly little I know ...

-- 
boB
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Am I missing something obvious about "FizzBuzz"?

2017-09-30 Thread Steven D'Aprano
On Sun, Oct 01, 2017 at 12:09:55AM -0500, boB Stepp wrote:

> If I understand the problem correctly, this gives the desired result.
> I would have had this in < 30 seconds if I did not stop at each stage
> and verified I was getting my expected result.  I don't claim to be a
> *real* programmer and am definitely no where approaching a
> professional programmer, but this question seems ridiculously easy!

Congratulations, according to some, you are a better programmer than 99% 
of self-described programmers.

https://blog.codinghorror.com/why-cant-programmers-program/

For a dissenting view:

https://www.skorks.com/2010/10/99-out-of-100-programmers-cant-program-i-call-bullshit/


-- 
Steve
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Am I missing something obvious about "FizzBuzz"?

2017-09-30 Thread boB Stepp
On the main Python list there is a thread entitled, "Beginners and
experts (Batchelder blog post)", and Stefan Ram mentioned:  "... The
fact that programmers can't program is known since the invention of
the "FizzBuzz" programmer test. ..."

I vaguely recall seeing some reference to "FizzBuzz" in my past
Internet wanderings, but did not recall any specifics, so did a search
for it.  My first hit was http://wiki.c2.com/?FizzBuzzTest  So I went
there and was informed:


The "Fizz-Buzz test" is an interview question designed to help filter
out the 99.5% of programming job candidates who can't seem to program
their way out of a wet paper bag. The text of the programming
assignment is as follows:"Write a program that prints the numbers from
1 to 100. But for multiples of three print “Fizz” instead of the
number and for the multiples of five print “Buzz”. For numbers which
are multiples of both three and five print “FizzBuzz”."


I did *not* read any further, opened up gVim, and in less than 5 minutes had:

for i in range(1, 101):
if i % 15 == 0:
print('FizzBuzz')
elif i % 3 == 0:
print('Fizz')
elif i % 5 == 0:
print('Buzz')
else:
print(i)

If I understand the problem correctly, this gives the desired result.
I would have had this in < 30 seconds if I did not stop at each stage
and verified I was getting my expected result.  I don't claim to be a
*real* programmer and am definitely no where approaching a
professional programmer, but this question seems ridiculously easy!
Surely I am missing something obvious and substantial?  Of course, I
could have done tests, comments, prettied up the output, etc., but the
essential problem seems to be trivial for *anyone* exposed to the if -
elif - else structure and is aware of the modulus operator.  What am I
missing???  How can anyone in any programming language not get this
question right?

-- 
boB
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor