home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / alt / msdos / programm / 3067 < prev    next >
Encoding:
Internet Message Format  |  1993-01-02  |  5.6 KB

  1. Xref: sparky alt.msdos.programmer:3067 comp.os.msdos.programmer:11751 comp.sys.ibm.pc.programmer:724 comp.lang.c++:18637 comp.lang.c:19134
  2. Path: sparky!uunet!olivea!spool.mu.edu!umn.edu!csus.edu!netcom.com!jimlynch
  3. From: jimlynch@netcom.com (Jim Lynch)
  4. Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c
  5. Subject: Re: Newbie Wants Advice on C-Programming
  6. Message-ID: <1993Jan2.163028.8829@netcom.com>
  7. Date: 2 Jan 93 16:30:28 GMT
  8. References: <1992Dec23.220530.15347@netcom.com> <1992Dec24.172333.7339@grebyn.com>
  9. Organization: Netcom Online Communications Services (408-241-9760 login: guest)
  10. Lines: 110
  11.  
  12. In article <1992Dec24.172333.7339@grebyn.com> malak@grebyn.com (Michael Malak) writes:
  13. >In article <1992Dec23.220530.15347@netcom.com> noring@netcom.com (Jon Noring) writes:
  14. >>1) There seems to exist C, as well as C++, and possibly other variants.  What
  15. >>   are the differences between these?  Which should we learn first?
  16. >
  17. >In my opinion, there is no fast track to either C or C++.  
  18.  
  19. This is absolutely true. Both languages are littered with 'features' that make
  20. the language efficient by sacrificing some what-you-tell-it-is-what-it-does
  21. kind of functionality.
  22.  
  23. >I feel the
  24. >following must be learned in order:
  25. >   1) Pascal, with two semesters experience
  26.  
  27. Again, we agree.
  28.  
  29. >   2) Assembly, learned anywhere, with tinkering on your own
  30.  
  31. Yes but there are other ways to gain the necessary experience in machine-level
  32. issues and details. One way is to jump right into C (recommend a course in this
  33. case), another way might be to bridge the gap with a stack-based interpretive
  34. language such as Forth or Stoic (or PostScript??? hehe) because you will
  35. _always_ be running into the stack, and certain old-compiler/absence of
  36. function prototypes kinds of problems require for their understanding an
  37. understanding of stacks (with extensive practice in using stacks).
  38.  
  39. >   3) C, 2-3 years min. anywhere (college, real world, or tinkering)
  40.  
  41. Absolutely. C is a proper subset of C++, so learn C as thoroughly as possible.
  42.  
  43. >After that you can learn and appreciate C++.  You need to first learn
  44. >structured programming and algorithms, most importantly, linked lists
  45. >and trees.  
  46.  
  47. Absolutely. After writing Mac Applications in C, I went back and took an intro
  48. and a data structures/algorithms course and it filled in MANY holes.
  49.  
  50. [discussion of C's close ties with assembly deleted]
  51.  
  52. >To summarize, C programs should appear structured like Pascal programs,
  53.  
  54. (this is why I think it's important to learn Pascal. Besides, it was designed
  55. for the express purpose of teaching structured programming and its concepts.)
  56.  
  57. >but are really shorthand for assembly programs.  C++ facilitates
  58. >object-oriented programming, but you need experience when to use it
  59. >because you can too easily introduce inefficiencies.
  60.  
  61. due to the fact that C lifts Pascal's protection of the programmer from him/her-
  62. self.
  63.  
  64. >>4) What books would you recommend in learning C (my wife might want to take
  65. >>   classes - I do better teaching myself)?  And of course, since I will be
  66. >>   doing programming on a PC, what books would you recommend that are
  67. >>   specific to that platform, especially w.r.t. memory management as well
  68. >>   as graphics?
  69. >
  70. >You should always start out with the official books:
  71. >
  72. >For C, it is _The_C_Programming_Langauge_ 2nd ed. by Kernighan & Ritchie
  73. >For C++, it is _The_C++_Programming_Language 2nd ed. by Stroustrup
  74.  
  75. No no no no no no no no no no no no. These books are _unreadible_ to a beginner.
  76. However, they can be quite valuable as a reference (whenever you get around to
  77. learning how to read them...)
  78.  
  79. >For each language, you may optionally buy a more tutorial or descriptive
  80. >book.  
  81.  
  82. If you expect to learn C/C++ in any resemblence of a pleasant experience,
  83. this is *NOT* optional.
  84.  
  85. >The books listed above are more reference books than tutorials.
  86. >Although they do start with the basis, and then build on them, they do
  87. >so in a math book kind of way.  Just go to a computer book store and
  88. >thumb through some of the books and buy the one(s) that appear to teach
  89. >the way you like to learn.  
  90.  
  91. This is arguably the best comment you have made. I agree completely.
  92.  
  93. >Use the reference books to verify the
  94. >tutorial books, and to provide complete information.
  95.  
  96. Great suggestion for experienced C programmers as well as beginners who have
  97. majored in math. My feeling is that as humans have limited time, they must
  98. choose some things and ignore others, just like you have to do in the vast
  99. world of the internet. Verification takes a long time. Understanding those
  100. practically-unreadible-but otherwise-great reference texts also takes a long
  101. time. Learning to program in C takes a long time too but not _as_ long.
  102.  
  103. >As for memory management, it is a non-issue in the 32-bit world, which
  104. >is the way the world is going.  The kluges invented for the 16-bit
  105. >DOS world, expanded memory (EMS) and extended memory (XMS) are pretty
  106. >technical and not necessary for either 16-bit Windows or 32-bit DOS
  107. >extenders.
  108.  
  109. Memory management is never a non-issue unless you own the computer and there
  110. are no OSes or anything else in the memory space of _your_ (otherwise
  111. completely empty) computer.
  112.  
  113. A partial response to this question should include the fact that functions
  114. which allocate and free memory are available in the standard library of C
  115. and C++. Otherwise, this is a subject to be taken up in the process of learning
  116. the language.
  117.  
  118. All in all, your comments have been thoughtfull and correct, however some of
  119. the comments will only be appropriate sometime between 6 months and 3-4 years
  120. from now when the original questioner is much more experienced. You've forgotten
  121. what it was like to be a beginner.
  122.