OT: CS education gone wrong (Was: Re: TDD is BS?)

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Jun 21 14:51:42 PDT 2013


On Fri, Jun 21, 2013 at 05:33:45PM -0400, Andrei Alexandrescu wrote:
[...]
> Also it's fair to ask about implementing a stdlib function itself if
> the interview concerns some systems-level work; e.g. brute-force
> strstr() is fair game and I think any engineer should be able to
> lift it off the ground quickly (to my dismay, only a fraction can).

Yeah, I was rather dismayed at how many people lacked basic
understanding of the programming language they purport to be skilled in.
Like not understanding variable shadowing in C, or simple closures in
Javascript (not the evilly-nested convolution I tested for in a
different test question :-P).


> Paradoxically use of stdlib functions may actually hurt; I've seen
> people who e.g. call strlen() in a loop in order to implement
> strstr()!
[...]

My favorite example of poor strlen() usage is writing "strlen()==0" in a
loop condition.

More typical causes of disqualification, though, are what one of my
university professors affectionately called "squirrelly code": code that
*probably* does what it's supposed to, but does so by roundabout,
non-obvious ways, running around here and there doing little things that
don't really relate directly to the problem at hand (like squirrels
running around hunting for their forgotten stash of nuts). Code like
this typically demonstrate a lack of understanding of programming in
general, or lack of understanding of the problem at hand, or inability
to identify and address the salient points of said problem. Typical
symptoms include declaring and using useless variables, calling printf
inside a function that shouldn't be doing I/O, doing unnecessary type
conversions to perform trivial computations (converting int to string
and attempting to do arithmetic on the digits in the string), odd usage
of loops and conditionals in unexpected places, using comments to urge
the computer to do what one wishes, etc..

The software analogue of Rube Goldberg machines, if you will. :-P


T

-- 
Век живи - век учись. А дураком помрёшь.


More information about the Digitalmars-d mailing list