BrainBench Unix programming test is BrainDead



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I recently took a BrainBench test on "Unix programming." The
questions seemed to fall into two categories: trivial or nonsensical.

The trivial questions usually involved low level API usage or shell
syntax or the like. These I could mostly answer off the top of my
head or with a quick look at the man page.

The nonsensical questions seemed to be attempts to assess conceptual
knowledge of broader subjects.

For example:

-
-----------------------------------------------------------------------------

Which one of the following is the main advantage of non-blocking I/O?

1) Control never leaves the originating routine.

2) Elements and variables are always reused, even if they are not
global.

3) Routines within a program that use non-blocking I/O are never
concurrent and thus never need locks.

4) Variables do not have to be initialized within any segment or
routine.

5) Control passes from one program routine to the next very quickly.

-
-----------------------------------------------------------------------------

The question is perfectly reasonable, but all of the answer choices
are vague and none seem to actually answer the question correctly.

First, Unix doesn't really have "routines," it has processes and
threads and C has functions. Functions are sometimes provided by
libraries.

I had to guess that the word "routine" is used to mean "function" or
maybe "system call." Not entirely clear.

I guessed that #5 was probably the best answer, since it was not
objectively false. But it didn't seem to objectively express
anything; "very quickly" seems subjective.

But if I read choice 5 as:

"Control [returns] from one [system call that initiates I/O] to the
[program] [more] quickly."

Then I could agree with that. It doesn't seem to express the "main
advantage" of non-blocking I/O, rather it seemed to restate it's
definition: I/O calls don't block.

The answer I would have liked to see is:

X) It allows a single thread to utilize concurrency, e.g., concurrent
processing and I/O and/or multiple concurrent I/O operations.

Doing some web searching I found what seems to be the source of the
question:

<http://www.kegel.com/dkftpbench/nonblocking.html>

"Programs that use non-blocking I/O tend to follow the rule that every
function has to return immediately, i.e. all the functions in such
programs are non-blocking. Thus control passes very quickly from one
routine to the next."

Looks like whoever formulated this question just grabbed it from this
public web page without a very deep understanding of Unix programming.

I was rated as "master level" Unix programmer. Gee whiz!

Are the other BrainBench tests as BrainDead?

-- Gene


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFGbICK+6lOFXNSgQwRAhSqAJsF9tICHdUX1FJa3OYguqjRxa7APgCgzEQ9
hcL+e5pr1Rgpc8dcKYRr4Bs=
=QK0u
-----END PGP SIGNATURE-----
.



Relevant Pages

  • Re: Native Code vs PCode OT
    ... > register Left-to-right Routine Yes ... claim influence or invention from Pascal. ... invented by a Russian first. ... to that new concept - Structured Programming. ...
    (microsoft.public.vb.general.discussion)
  • the problem of constants
    ... literal constants, ... Matlab's "copy on write" behaviour to provide the efficiency. ... prevent any routine from accidently changing the master ... to be any better, in terms of programming theory or efficiency, ...
    (comp.soft-sys.matlab)
  • Re: handling of errors
    ... Checking them is part of the job of programming. ... The invoked routine can only protect itself. ... Issue a message and don't set a return-code, thus making it appear the job completed successfully. ... I'm not saying remove meaningful error messages. ...
    (bit.listserv.ibm-main)
  • Re: OCP and Java
    ... > a hard time imagining any programmer with the clairvoyance required ... The only place that I can think of where frozen is used in the Eiffel ... An example is a routine that compares to objects for equality. ... > kind of flexibiliy is valuable there are already programming ...
    (comp.object)
  • Verbose Listing
    ... went through a comical attempt to retrieve some of my old programming ... move routine that is up on umich archive. ... better job of backing up posts then I do backing up hard drives so I ... sequence move above works. ...
    (comp.sys.atari.8bit)