home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.sources.wanted:3935 alt.sources.wanted:1359
- Newsgroups: comp.sources.wanted,alt.sources.wanted
- Path: sparky!uunet!cs.utexas.edu!torn!utzoo!telly!robohack!ve3ied!bduncan
- From: bduncan@ve3ied.UUCP (Bill Duncan)
- Subject: Re: script to center text
- Organization: TFMCS
- Date: Wed, 12 Aug 1992 04:20:52 GMT
- Message-ID: <1992Aug12.042052.3714@ve3ied.UUCP>
- References: <Bsr1M5.H33@research.canon.oz.au> <Bsr50s.H97@research.canon.oz.au> <BsrAAz.Ht6@research.canon.oz.au>
- Lines: 72
-
- In article <BsrAAz.Ht6@research.canon.oz.au> greyham@research.canon.oz.au (Graham Stoney) writes:
- >andy@research.canon.oz.au (Andy Newman) writes:
- >>greyham@research.canon.oz.au (Graham Stoney) writes:
- >>>
- >>>Bill, perhaps you have a different definition of "size" to most of us?.
- >>>
- >
- >>Yes. He may be thinking about resource usage by the process not by how
- >>many lines of source make up the program. How big is the Perl interpreter?
- >
- >This was already covered earlier in the thread; It was Tom who brought up the
- >topic of size, and he was quite clearly referring to program size:
- >
- >Tom Christiansen <tchrist@convex.COM> writes:
- >>But for size and convenience, Perl clearly wins over C.
- >
- >>You really have to compare the size of the perl program with the size of
- >>the C program.
- >
- >You may think otherwise if you wish, but the Perl program will still have a
- >smaller size than the C program.
- >
- >Graham
- >--
- >Graham Stoney | "a Perl script is correct if it's halfway
- >Flip Dibner fan club, "Hi Flip!" | readable and gets the job done before your
- >Ph: +61 2 805-2909 Fax: -2929 | boss fires you." L. Wall & R. Schwartz
-
- Unfortunately, it seems my feed has been eating parts of this thread, as I've
- missed some of these comments.
-
- My "idea of size" is *also* weighed against the time to develop/write/maintain
- a piece of code. If you are going to write a one liner and then forget it,
- then by all means, use whatever means at your disposal and that you feel
- comfortable with.
-
- But as I've said in my earlier posting: don't forget that we *are* talking
- about centering a single line of text, which is relatively trivial in almost
- any language. (Well, there are exceptions.. ;-)
-
- What I am getting at, is some of the fundamental design philosophy as
- embodied in several books by people who were closely tied with the design
- of Unix itself. Keep the tools simple, do one thing well, and design with
- re-usability in mind.
-
- Using a several hundred kilobyte program to centre a single line of text,
- seems like a bit of an overkill to me. And it sounds like it comes from
- people who grew up in the "me-too" generation, with complete disregard as
- to what their actions might do to other users on the system. (If they
- need this big a sledge hammer to centre a line of text, what will they
- need when they come across a "real-problem"?)
-
- My simple program (which as someone pointed out, grew to over 20 lines),
- probably took less energy to write, (and fewer lines), than many of
- the responses defending Perl for this. My program compiles to 6K.
- (Yes, that was Six Kilobytes.) I know that re-using this simple utility
- will never be a drain on any system, and would feel a bit more comfortable
- including this in any shell scripts I might do.
-
- I also use any of the standard tools which can be found on most Unix systems
- whenever "they" are appropriate. If I was going to do something like this
- once, and then never again need it, then I might use something like Perl
- if I was in a hurry. (I might even write it as a shell function.)
-
- If I had a few extra minutes to think about it though, I might want to re-use
- it and write the 20 odd lines which I did. It might come in handy again
- sometime.
-
- Regards,
-
- Bill Duncan (bduncan@ve3ied.UUCP -or- ..robohack!ve3ied!bduncan)
-
-