home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sources / wanted / 3935 < prev    next >
Encoding:
Internet Message Format  |  1992-08-13  |  3.7 KB

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