From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: *** X-Spam-Status: No, score=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,97188312486d4578 X-Google-Attributes: gidfc89c,public X-Google-Thread: 109fba,baaf5f793d03d420 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,6154de2e240de72a X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,97188312486d4578 X-Google-Attributes: gid103376,public From: "Tim Behrendsen" Subject: Re: What's the best language to start with Date: 1996/08/14 Message-ID: <01bb8a0e$8572f760$87ee6fce@timpent.airshields.com>#1/1 X-Deja-AN: 174172243 references: <199608110535.WAA18572@pioneer.nevada.edu> content-type: text/plain; charset=ISO-8859-1 organization: A-SIS mime-version: 1.0 newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.unix.programmer Date: 1996-08-14T00:00:00+00:00 List-Id: Robert Dewar wrote in article ... > Tim says > > "I would say about 95-98% of the applicants get this question > wrong. I have had people I respect give the "obvious" wrong answer, > though, so it's mostly a matter of not really thinking about it > before answering." > > I can't see an obviously wrong answer, only a trivially right one, so > perhaps you should tell us the mysterious obviously wrong answer. I tried > this on a few people around here and they were all as puzzled as I was. Well, it seemed obvious to me, too when I heard it the first time (A friend of mine's father used it as an intelligence test to programmers), but I guess that shows the general level of competence in the world. The typical wrong answer (if I get an answer at all) is to describe some elaborate data structure to keep track of the "duplicates". Here's a couple of examples [pulling off the "reject" stack]: ----------- "The basic need for the program is to replace the input, given from a C source, with a unique name of "VARXXXXX". The main body of this program would simply read in data (in c) and replace it with a variable name. In order to make sure any one input source did not have the same variable name (as what it might be replaced with) we would simply have to add a condition to our loop. The program would be set up in the form of a _loop_ where a variable is read _AND_ check that the unique name it will be replaced with is not the same as the input source file and then proceed to replace the variables. In the case where the input file did have the same variable, a new variable name would have to be used." [Underlines were the applicant's] ------------------- - or - "I guess it depends on the requirements, performance, but you could read the code first, save all the variables in a list, then read the code a second time, then you replace the variable to a new name, you can check to see if exists already." Without mentioning the school, this last graduated with a 3.5 and a Dean's Honor List distinction. Completely unable to think. --------------------- I wasn't intentionally picking the most lame ones, BTW; these were pretty much the ones on the top of the (reject) stack. Also to be fair, I make them hand-write the solutions, which is why the grammar is often not perfect (although, still pretty lame). -- Tim Behrendsen (tim@airshields.com)