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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,eaf4373c914be241 X-Google-Attributes: gid103376,public From: "W. Wesley Groleau (Wes)" Subject: Re: Learning approaches (was What's the best language...) Date: 1996/08/14 Message-ID: <9608141702.AA08354@most>#1/1 X-Deja-AN: 174922517 sender: Ada programming language comments: To: info-ada%listserv.nodak.edu@emcee.com mailer: Elm [revision: 70.85] newsgroups: comp.lang.ada Date: 1996-08-14T00:00:00+00:00 List-Id: > You are writing a preprocessor program that takes C source as > its input. The preprocessor replaces all variables and symbols > in the program with unique names of the form VARxxxxxx, where > "xxxxxx" is an incrementing decimal number. Describe what is > needed to handle the case where the input source file already > contains a variable of that form. Here are the answers of four people. Which one will get hired? Person who prefers to look at requirements, generalities, abstractions: "Nothing. If the input is to be replaced, any similarity it has to the appearance of the replacement is irrelevant." Person who prefers to look at implementation, specific, concrete: "Well, I suppose each string could have a flag associated with it so that when it goes through the next pipe and we match the output string to the input we would know that it isn't a match by the flag and then we could strip the flags off at the end with awk or perl." Experienced PL/1 programmer: "That's a stupid thing to do; there no sensible reason for taking meaningful symbols and robbing them of all mnemonic value. If you were using PL/1, you wouldn't be asking such a question-- your staff would have straightened you out long ago." -- --------------------------------------------------------------------------- W. Wesley Groleau (Wes) Office: 219-429-4923 Hughes Defense Communications (MS 10-40) Home: 219-471-7206 Fort Wayne, IN 46808 (Unix): wwgrol@pseserv3.fw.hac.com ---------------------------------------------------------------------------