Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-spam!mordor!lll-tis!ames!amdcad!sun!imagen!auspyr!mick From: mick@auspyr.UUCP (Mick Andrew) Newsgroups: comp.lang.c Subject: Re: Writing readable code Message-ID: <6858@auspyr.UUCP> Date: Fri, 26-Jun-87 12:28:24 EDT Article-I.D.: auspyr.6858 Posted: Fri Jun 26 12:28:24 1987 Date-Received: Sat, 27-Jun-87 13:59:51 EDT References: <1158@copper.TEK.COM> Organization: Austec, Inc., San Jose, CA. USA Lines: 27 in article <1158@copper.TEK.COM>, stevesu@copper.TEK.COM (Steve Summit) says: [ All kinds of good stuff deleted. ] Steve Summit made an excellent posting regarding writing clear, understandable code. More good sense and useful observations than have been seen on the net in many moons. I agree 99.9% with all of his comments on coding style, especially the awful habit of making code "better" by reducing the total character count. In the spirit of if(p != NULL) vs. if(!p) I offer one of my favourite obfuscated one liners: if (strcmp(s1, s2) == 0) vs. if (!strcmp(s1, s2)) In general, I try to use the yardstick, "if it seems like a neat trick, don't do it!" -- ---- Mick Austec, Inc., San Jose, CA {sdencore,necntc,cbosgd,amdahl,ptsfa,dana}!aussjo!mick {styx,imagen,dlb,gould,sci,altnet}!auspyr!mick