[comp.lang.c] C Programmer's Environment

evil@arcturus.UUCP (Wade Guthrie) (06/09/89)

After having programmed in C for a number of years, I have come across
various useful components to a programmer's environment; however, I still
wonder if other tidbits have passed me by.  My question is this, what would
you, the programmer, consider part of the ideal C programming environment
(some of this, I realize, is useful for other than C programming, but
that is not of my concern :->)?  I would certainly include:
	- make
	- a symbolic debugger
	- error (on UNIX -- inserts comments which are error msgs.)
	- a C interpereter (which can call compiled sub-modules)
	- a C compiler (of-course)
	- vi
	- curses (no flames, please)

what else would you include (it doesn't have to exist) ?  I am anxiously 
awaiting the response.


Wade Guthrie
evil@arcturus.UUCP
Rockwell International
Anaheim, CA

(Rockwell doesn't necessarily believe / stand by what I'm saying; how could
they when *I* don't even know what I'm talking about???)

Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) (06/12/89)

Scrap vi and replace it with Emacs... 

chip@ateng.ateng.com (Chip Salzenberg) (06/12/89)

According to evil@arcturus.UUCP (Wade Guthrie):
>After having programmed in C for a number of years, I have come across
>various useful components to a programmer's environment; however, I still
>wonder if other tidbits have passed me by.

Well, making the assumption that you're using Unix...

    RCS (Revision Control System)
     -or-
    SCCS (Source Code Control System)
    diff (esp. context diff)
    perl (for wholesale batch text editing, it's better than sed)
    tcsh or bash (love that filename completion...)

-- 
You may redistribute this article only to those who may freely do likewise.
Chip Salzenberg         |       <chip@ateng.com> or <uunet!ateng!chip>
A T Engineering         |       Me?  Speak for my company?  Surely you jest!

pld@hpcll10.HP.COM (Paul L. Dineen) (06/14/89)

 echo "Scrap vi and replace it with Emacs..." >>comp.editors

paulc@microsoft.UUCP (Paul Canniff 2/1011) (06/14/89)

In article <14810.2494481A@urchin.fidonet.org> Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) writes:
>Scrap vi and replace it with Emacs... 

Or, to generalize, scrap vi and replace it with
<substitue whatever editor you are most comfortable with
or rabidly addicted to here>.  Much religion here.

peter@ficc.uu.net (Peter da Silva) (06/15/89)

In article <14810.2494481A@urchin.fidonet.org> Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) writes:
>Scrap vi and replace it with Emacs... 

Emacs. What a wimp. I have this awesome version of TECO implemented in Lisp
1.5 that I run under Xlisp 1.6 using a compatibility package. It works great
under MS-DOS and CP/M, and a little shell script is all I need to run it
under UNIX:

: run this under sh
if [ -r xlisp.exe ]
then
  vpix xlisp
else
  stty raw; xlisp; stty cooked
fi

(It's a joke, OK)
-- 
Peter da Silva, Xenix Support, Ferranti International Controls Corporation.

Business: uunet.uu.net!ficc!peter, peter@ficc.uu.net, +1 713 274 5180.
Personal: ...!texbell!sugar!peter, peter@sugar.hackercorp.com.

bph@buengc.BU.EDU (Blair P. Houghton) (06/16/89)

In article <6027@microsoft.UUCP> paulc@microsoft.UUCP (Paul Canniff 2/1011) writes:
>In article <14810.2494481A@urchin.fidonet.org> Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) writes:
>>Scrap vi and replace it with Emacs... 
>
>Or, to generalize, scrap vi and replace it with
><substitue whatever editor you are most comfortable with
>or rabidly addicted to here>.  Much religion here.

Or, to finish the trinity, scrap <whatever editor you
are unable to comprehend with the ease that came from
having no choice but to learn the one you currently
use> and replace it with <whatever editor
you are most comfortable with or rabidly addicted
to>.  Much religion here.

				--Blair
				  "The Ed, the Ex, and the Holy Vi...
				   The TECO, the EMACS and the GNU Emacs..."

kenny@m.cs.uiuc.edu (06/16/89)

/* Written 10:28 am  Jun 14, 1989 by paulc@microsoft.UUCP in m.cs.uiuc.edu:comp.lang.c */
In article <14810.2494481A@urchin.fidonet.org> Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) writes:
>Scrap vi and replace it with Emacs... 

Or, to generalize, scrap vi and replace it with
<substitue whatever editor you are most comfortable with
or rabidly addicted to here>.  Much religion here.
/* End of text from m.cs.uiuc.edu:comp.lang.c */

But, if you're a system administrator, *don't* force your users to
scrap their favorite environments unless it's necessary to preserve
consistency of your product.  I've had the experience of working on a
system where the sysadmin wouldn't *allow* me to use emacs (which was
on the system, but available only to users with a `documented need')
because `vi is better, anyway.'  Annoying, at best; crippling, at
worst.

Horne-Scott@cs.yale.edu (Scott Horne) (06/16/89)

In article <660040@hpcll10.HP.COM>, pld@hpcll10 (Paul L. Dineen) writes:
> 
>  echo "Scrap vi and replace it with Emacs..." >>comp.editors

$ echo "Scrap vi and replace it with Emacs..." >>alt.flame

bengsig@oracle.nl (Bjorn Engsig) (06/16/89)

[ let's bring this discussion over to comp.editors ]

From article <4700039@m.cs.uiuc.edu> by kenny@m.cs.uiuc.edu:
| I've had the experience of working on a
|system where the sysadmin wouldn't *allow* me to use emacs (which was
|on the system, but available only to users with a `documented need')
|because `vi is better, anyway.'  Annoying, at best; crippling, at
|worst.
I agree on this - use the tools available which fit your needs best.

On the other hand, a few days ago I used news on a machine where I
normally don't - and the default VISUAL was emacs which I have never
used.  Could all you emacs fans please give a good reason for not having
an obvious way of getting OUT of emacs, I tried anything like q, Q, x, X
various control keys etc., all without very much success.  I really
don't know how I finally got out of it.

Maybe I should just learn emacs - if we had it on this system :-)
-- 
Bjorn Engsig, ORACLE Europe         \ /    "Hofstadter's Law:  It always takes
Path:   mcvax!orcenl!bengsig         X      longer than you expect, even if you
Domain: bengsig@oracle.nl           / \     take into account Hofstadter's Law"

rkl@cbnewsh.ATT.COM (kevin.laux) (06/16/89)

	How about a linker and an archiver/librarian?

--rkl

frank@zen.co.uk (Frank Wales) (06/20/89)

In article <1133@vsi.COM> friedl@vsi.COM (Stephen J. Friedl) writes:
>In article <4700039@m.cs.uiuc.edu>, kenny@m.cs.uiuc.edu writes:
>> But, if you're a system administrator, *don't* force your users to
>> scrap their favorite environments unless it's necessary to preserve
>> consistency of your product.
>
>How about this one:
>In an office with a lot of people using spreadsheets, databases,
>word processors, everybody uses Lotus 1-2-3, dBase, and
>WordPerfect.  Everybody is happy.  Then somebody is hired who is
>realy comfortable with some other set of tools.  He tears into
>everything and becomes really productive, and everybody is still
>happy.  Then he leaves for whatever reason, and now nobody can
>figure out any of his stuff.  They can't run payroll, read any of
>his WP files, etc.  Then the new guy wonders why the management
>says "you will use *these* tools."

This seems a red herring to me.  vi/emacs/your-fave-editor all
work on the *same* stuff, plain text files.  So do all the compilers,
etc..  At least in this case, the problems associated with
incompatible file formats and so on don't apply.  In terms of
product, all development environments ought to be equivalent.
[Of course, if the new guy uses another programming language, that's
a fish of a different colour.]
--
Frank Wales, Systems Manager,        [frank@zen.co.uk<->mcvax!zen.co.uk!frank]
Zengrange Ltd., Greenfield Rd., Leeds, ENGLAND, LS9 8DB. (+44) 532 489048 x217 

friedl@vsi.COM (Stephen J. Friedl) (06/20/89)

> In article <1133@vsi.COM> friedl@vsi.COM (Stephen J. Friedl) writes:
> Whether somebody uses emacs or vi doesn't really have the impact
> of other things like compilers, but in many environments,
> personal productivity is not the highest measure.
 
In article <4726@alvin.mcnc.org>, spl@mcnc.org (Steve Lamont) writes:
> What is?  Conformity?

I can't say for sure what the highest measure it, but "group
productivity" is likely to be right up there.  Of course,
personal productivity of the individual team members is a very
important part of this, and I am the first to encourage people to
use tools and techniques that let them make best use of their
time.  When they take a turn that cuts down on the productivity
of the other team members, then the benefits of this new turn
must be weighed.

Let's say that any ten of us (including me) are on the project
team.  I might be very productive, but if my C coding style is
*so*out*there* that nobody can read my code (or refuses to), then
should I be allowed to keep it?  I say maybe not.  Yes, a forced
change will cut down on my productivity, but if it increases the
overall group productivity then it must be considered.

Some productivity measures are benign with respect to the group,
and I would say that choice of an editor is one of them (assuming
the selected one is available anyway).  Saying "you can't use
Emacs because we don't like you" seems like a shortsighted
decision to me.

These decisions can certainly be religious -- programmers have
strongs senses of "doing it my way" -- and they are subjective
as well.  Nevertheless, the impact of all personal decisions
must be weighed against the productivity of the group.

     Steve

-- 
Stephen J. Friedl / V-Systems, Inc. / Santa Ana, CA / +1 714 545 6442 
3B2-kind-of-guy   / friedl@vsi.com  / {attmail, uunet, etc}!vsi!friedl
                                          ---> vsi!bang!friedl <-- NEW
"Friends don't let friends run Xenix" - me

Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) (06/20/89)

In an article of <15 Jun 89 19:02:00 GMT>, kenny@m.cs.uiuc.edu writes:

 >Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) writes:
 >>Scrap vi and replace it with Emacs... 
 >
 >Or, to generalize, scrap vi and replace it with
 ><substitue whatever editor you are most comfortable with
 >or rabidly addicted to here>.  Much religion here.
 >/* End of text from m.cs.uiuc.edu:comp.lang.c */
 >
 >But, if you're a system administrator, *don't* force your users to
 >scrap their favorite environments unless it's necessary to preserve
 >consistency of your product.  I've had the experience of working on a
 >system where the sysadmin wouldn't *allow* me to use emacs (which was
 >on the system, but available only to users with a `documented need')
 >because `vi is better, anyway.'  Annoying, at best; crippling, at worst.

Which is what I was really trying to imply in the first place. Sheesh, what  
did I start here?!? I use Epsilon (which is an Emacs derivative) where  
possible and Emacs everywhere else. When starting a new job, I walk in with my  
tape/disk/rosetta stone/etc. of EEL code and make whatever machine I'm working  
on look as much like what I'm used to as the keyboard will allow. Aside from  
merely being used to Emacs, I like its programmability and that it's usually  
available anywhere I go. *BUT* the real goal is productivity - your mileage  
may vary... 

ggw@wolves.UUCP (Gregory G. Woodbury) (06/21/89)

In <4726@alvin.mcnc.org> Steve Lamont wrote:
>  In article <1133@vsi.COM> friedl@vsi.COM (Stephen J. Friedl) writes:
>  | Whether somebody uses emacs or vi doesn't really have the impact
>  | of other things like compilers, but in many environments,
>  | personal productivity is not the highest measure.
>
>What is?  Conformity?

It is not clear quite where this is going to or coming from, but an editor
war is unnecessary in response to the original question of what tools would
be usefull in a programming environment.  It should be sufficient to say that
the editor of the programmer's choice should be included.

 Also, Steve, it may be that the editor of choice is not available as a
vendor supported product.  In many situations, and becoming more common as
binary only systems become more common, only one visual editor is available
as an official product from the vendor.  In such a situation, the system
administration may not be able to deal with the headaches of supporting
a different editor.  Even if the code for the editor may be available for
"free", there are significant costs to supporting it that may not be obvious.

Most readers of these newsgroups are fortunate to have full source code
access, or at least access to some additional support.  But we tend to
forget that we are not the majority of computer users.

raulmill@nunki.usc.edu (Raul) (07/01/89)

In article <4962@arcturus> evil@arcturus.UUCP (Wade Guthrie) writes:
-> After having programmed in C for a number of years, I have come across
-> various useful components to a programmer's environment; however, I still
-> wonder if other tidbits have passed me by.  My question is this, what would
-> you, the programmer, consider part of the ideal C programming environment

Looks like this topic has turned into fluff, but if anyone is still
reading it, I have found that I VERY VERY MUCH like the combination of
etags with emacs (gnu emacs, and probably others).  For those of you
who have never run across this (or have some other variant of the same
tool), etags builds a reference table which emacs uses to locate
functions.  With etags, you can edit a multi-megabyte program which
might even be scattered throughout your directory structure almost as
easily as if you were editing one file.  Actually, it is easier than
editing a single file, if you consider the pain of editing a program
saved as a multi-megabyte file.

Rumor has it that vi users can get some of this functionality with a
program called ctags.

Raul Rockwell                                      |
INTERNET:   raulmill@usc.edu                       |
UUCP:       ...uunet!usc!raulmill                  |  55 mph = 82 nc
U.S.SNAIL:  721 E Windsor #4,  GLENDALE CA  91205  |

dg@lakart.UUCP (David Goodenough) (07/22/89)

peter@ficc.uu.net (Peter da Silva) sez:
> Bob.Stout@p6.f506.n106.z1.fidonet.org (Bob Stout) writes:
>>Scrap vi and replace it with Emacs... 
> 
> Emacs. What a wimp. I have this awesome version of TECO implemented in Lisp
> 1.5 that I run under Xlisp 1.6 using a compatibility package. It works great
> under MS-DOS and CP/M, and a little shell script is all I need to run it
> under UNIX:
> 
> (It's a joke, OK)

Real strange.... It _MUST_ be the full moon - this is the second
case of comp.editors.wars going on right now - if anyone would care to
check in comp.os.cpm there's one in progress. (now please, don't start
a third flame war, it's getting pretty warm round here) For those that
are interested (or running hack), it _IS_ a full moon right now. Makes
you wonder :-) :-) :-)
-- 
	dg@lakart.UUCP - David Goodenough		+---+
						IHS	| +-+-+
	....... !harvard!xait!lakart!dg			+-+-+ |
AKA:	dg%lakart.uucp@xait.xerox.com		  	  +---+

ggw@wolves.UUCP (Gregory G. Woodbury) (07/22/89)

In <4962@arcturus> Wade Guthrie wrote:
>....  My question is this, what would
>you, the programmer, consider part of the ideal C programming environment
>I would certainly include:
>	- make
>	- a symbolic debugger
>	- error (on UNIX -- inserts comments which are error msgs.)
>	- a C interpereter (which can call compiled sub-modules)
>	- a C compiler (of-course)
>	- vi
>	- curses (no flames, please)
>
>what else would you include (it doesn't have to exist) ?  I am anxiously 
>awaiting the response.

	One of the most usefull things taht I find is the Source Code Control
System (SCCS) or its equivalent.  A lot of people that I have talked to are not
that aware of just how powerfull this can be when used with a bit of creative
thought.  It is, of course, invaluable if you are trying to maintain different
releases of software in a "published" software system, but even in a personal
development environment, it can be very usefull in letting you track the
evolution of a module and know what pieces/versions are in place in a given
program.

	A second thing that I find usefull is one of the graphical directory
viewers/shell interfaces that lets you define hot keys and annotate the files
in a directory tree.  (What!?  you don't have one?  Write it! I did.)

	The third addition is NetNews.  Without the wonderfull discussions
that appear here, I'd fall into all sorts of traps and errors, and would be
writing non-portable applications, and not have all sorts of useful tools.

--
Greg Woodbury.         What do you mean by "not everyone thinks the way I do"?

anw@maths.nott.ac.uk (Dr A. N. Walker) (07/22/89)

In article <4962@arcturus> evil@arcturus.UUCP (Wade Guthrie) writes:
> [What is in the ideal C environment?]

and so far, we've been told:

	make, symbolic debugger, error, C interpreter, C compiler,
	vi/emacs, curses, RCS/SCCS, diff, perl, tcsh/bash

(and no doubt others winging their way towards Nottingham even as I type).

	You will all realise that a PDP 11/44 is not an ideal environment,
no matter what titbits are added to the software;  but in over a dozen years
of C programming I have *never* *used* on Tuck:

	adb/sdb, error, C interp, vi/emacs, RCS/SCCS, perl, tcsh/bash;

indeed, only "adb" and "rcs" of this list actually exist on the machine.  I
have to report that I have never missed any of 'em, except "perl" (which is
too big to Yacc).

	"*grep" and "lint" should be added very near the top of the list,
and a cross-referencer (ours is called "xref") is sometimes useful.
Another *major* aid to productivity is the LaserWriter together with
software (ours is called "ascps") for listing programs thereto in 4-up
or 8-up (16-up is going a little far, but possible) format, thus getting
(typically) 448 lines of code per sheet, and enabling surprisingly large
chunks of program to be viewed as a unit.

-- 
Andy Walker, Maths Dept., Nott'm Univ., UK.
anw@maths.nott.ac.uk

dan@oresoft.uu.net (Daniel Elbaum) (07/23/89)

In article <63786@yale-celray.yale.UUCP> Horne-Scott@cs.yale.edu (Scott Horne) writes:
>In article <660040@hpcll10.HP.COM>, pld@hpcll10 (Paul L. Dineen) writes:
>> 
>>  echo "Scrap vi and replace it with Emacs..." >>comp.editors
>
>$ echo "Scrap vi and replace it with Emacs..." >>alt.flame

[The S/N ration is getting perilously high, so:]

vi?  emacs?  TECO!!?  What weenies!  Scrap 'em all and replace
'em with cat!

[or, better yet, rewrite the tty driver so that everything from
a line beginning with '#' to a line ending with '}' gets dumped
to a file called 'foo.c' and the compiler invoked automatically]

spl@mcnc.org (Steve Lamont) (07/23/89)

In article <1133@vsi.COM> friedl@vsi.COM (Stephen J. Friedl) writes:
>Whether somebody uses emacs or vi doesn't really have the impact
>of other things like compilers, but in many environments,
>personal productivity is not the highest measure.

What is?  Conformity?

-- 
							spl
Steve Lamont, sciViGuy			EMail:	spl@ncsc.org
North Carolina Supercomputing Center	Phone: (919) 248-1120
Box 12732/RTP, NC 27709

friedl@vsi.COM (Stephen J. Friedl) (07/23/89)

In article <4700039@m.cs.uiuc.edu>, kenny@m.cs.uiuc.edu writes:
> 
> But, if you're a system administrator, *don't* force your users to
> scrap their favorite environments unless it's necessary to preserve
> consistency of your product.  I've had the experience of working on a
> system where the sysadmin wouldn't *allow* me to use emacs (which was
> on the system, but available only to users with a `documented need')
> because `vi is better, anyway.'  Annoying, at best; crippling, at
> worst.

One must be careful with this kind of statement.  Certainly,
there is a benefit if everybody can use the tools with which they
are most comfortable.  However, a company doesn't have to be
producing a "product" to make restrictions on tools relevant.

How about this one:
In an office with a lot of people using spreadsheets, databases,
word processors, everybody uses Lotus 1-2-3, dBase, and
WordPerfect.  Everybody is happy.  Then somebody is hired who is
realy comfortable with some other set of tools.  He tears into
everything and becomes really productive, and everybody is still
happy.  Then he leaves for whatever reason, and now nobody can
figure out any of his stuff.  They can't run payroll, read any of
his WP files, etc.  Then the new guy wonders why the management
says "you will use *these* tools."

Whether somebody uses emacs or vi doesn't really have the impact
of other things like compilers, but in many environments,
personal productivity is not the highest measure.

     Steve

P.S. - Sorry to be a wet blanket :-(
-- 
Stephen J. Friedl / V-Systems, Inc. / Santa Ana, CA / +1 714 545 6442 
3B2-kind-of-guy   / friedl@vsi.com  / {attmail, uunet, etc}!vsi!friedl
                                          ---> vsi!bang!friedl <-- NEW
"Friends don't let friends run Xenix" - me

henry@utzoo.uucp (Henry Spencer) (08/17/89)

In article <4726@alvin.mcnc.org> spl@mcnc.org.UUCP (Steve Lamont) writes:
>>Whether somebody uses emacs or vi doesn't really have the impact
>>of other things like compilers, but in many environments,
>>personal productivity is not the highest measure.
>
>What is?  Conformity?

Group productivity.  Which, in an environment where people sometimes have
to work on each other's code, demands a certain amount of standardization.
-- 
V7 /bin/mail source: 554 lines.|     Henry Spencer at U of Toronto Zoology
1989 X.400 specs: 2200+ pages. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu