From owner-freebsd-chat Tue Jan 23 10:43: 3 2001 Delivered-To: freebsd-chat@freebsd.org Received: from winnie.fit.edu (fit.edu [163.118.5.1]) by hub.freebsd.org (Postfix) with ESMTP id 53BD837B402 for ; Tue, 23 Jan 2001 10:42:45 -0800 (PST) Received: from netzero.net (rm305w-b.campbell.fit.edu [163.118.216.112]) by winnie.fit.edu (8.9.1/8.9.1) with ESMTP id NAA15552 for ; Tue, 23 Jan 2001 13:43:21 -0500 (EST) Message-ID: <3A6DD0B2.B473AF52@netzero.net> Date: Tue, 23 Jan 2001 13:42:58 -0500 From: Kevin Brunelle X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-chat@FreeBSD.ORG Subject: Re: C style continued.... (Craig and Terry) References: <3.0.6.32.20010123091354.009de7c0@mail85.pair.com> <3.0.6.32.20010123095930.00a14550@mail85.pair.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Okay, time for me to jump in, let me make it very clear where I stand on this issue. I am K&R all the way. I started learning that way and it always made the most sense to me. Besides, K&R is beautiful -- IMO. But the real reason I am even contributing to this conversation has to do with code you write outside your control. Every bit of code I write for myself I write in K&R, but for a college class that I am in it must follow the style guide. What does the style guide say? Let's just say that you could scare small children with the code submitted for that class. It is a mixture of all the worst ideas ever conceived. It is very close to some code posted before (included below). Now that is ugly! Not only is this a bad thing, because it teaches new programmers how to write really ugly code as habit; but, you cannot deviate from style. My first program was turned in in K&R style; 40% was the max. grade I could get on it. Yeah, a good coder can write in whatever style he/she needs to but they don't have to like it. The only time I was happy writing code for that class was when we were paired up for final projects. I was paired with a person who was a mediocre programmer at best. I was able to write 95% of the code, and he made it fit the style guide. ;-) I guess what I am wasting your bandwidth and hard drive space to say is: You are going to have to write ugly code for other people, do you have to write it for yourself too? A little side note here: This teacher is totally stuck in his way of doing things. Another issue I had with him was licensing. He wanted all the code in class GPL'd I wanted my code to be BSD'd. He said that was fine, but any code that wasn't GPL wasn't graded. It took a week to get him to elaborate on the issue any further than that, and I am still writing under the GPL for the class unless "... an act of god forbids it." >if ( > i > == > 0 > ) > { > foo( > i > ) > ; > > bar( > i > ) > ; > } Kevin Brunelle -- "Do not meddle in the affairs of sysadmins, for they are subtle and quick to anger." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message