home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / alt / msdos / programm / 3008 < prev    next >
Encoding:
Internet Message Format  |  1992-12-24  |  6.3 KB

  1. Xref: sparky alt.msdos.programmer:3008 comp.os.msdos.programmer:11611 comp.sys.ibm.pc.programmer:673 comp.lang.c++:18406 comp.lang.c:18879
  2. Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c
  3. Path: sparky!uunet!sequent!muncher.sequent.com!furballs
  4. From: furballs@sequent.com (Paul Penrod)
  5. Subject: Re: Newbie Wants Advice on C-Programming
  6. Message-ID: <1992Dec24.230420.4243@sequent.com>
  7. Sender: usenet@sequent.com (usenet )
  8. Nntp-Posting-Host: crg8.sequent.com
  9. Organization: Sequent Computer Systems, Inc.
  10. References: <1992Dec23.220530.15347@netcom.com> <1992Dec24.154204.25248@blkbox>
  11. Date: Thu, 24 Dec 92 23:04:20 GMT
  12. Lines: 124
  13.  
  14. In article <1992Dec24.154204.25248@blkbox> collins@blkbox (Chad R. Collins) writes:
  15. >noring@netcom.com (Jon Noring) writes:
  16. >
  17. >>Hello,
  18. >
  19. >>My wife, who is a database analyst working with DB2, etc. (all IBM mainframe
  20. >>stuff), is now interested in learning C programming because of pending changes
  21. >>at the company she works.  I, too, have an interest in learning C - I'd like to
  22. >>be able to write programs to solve a variety of problems (I've done a lot of
  23. >>fairly complex scientific programming with, heaven-forbid, Fortran, so I do
  24. >>have some general programming experience).
  25. >
  26. >>Since both of us are newbies in this area, I'd like some advice as well as
  27. >>answers to the following questions:
  28. >
  29. >>1) There seems to exist C, as well as C++, and possibly other variants.  What
  30. >>   are the differences between these?  Which should we learn first?
  31. >
  32. >    Well, C is basically a subset of C++.... anything you write in C
  33. >should be compatible with C++. C++ is an extension of C, which primarily adds
  34. >objects. Personally, I prefer C becuase it is well standardized and I frankly
  35. >think most of what C++ adds is a waste of time. However, alot of people would
  36. >disagree with me, so you might want to look into who and what around you
  37. >will be learning. I think if you learn C first you will be safe, just becase
  38. >C works with C++ and not vice versa.
  39. >
  40.  
  41. Well, C may be syntactically a subset of C++, but it requires a
  42. different line of thinking. C is basically a high level assembler
  43. with the ability to produce functional blocks more precisely than
  44. Assembly.
  45.  
  46. In a previous post, some suggested you learn PASCAL first. I don't
  47. think so. You can learn C without having to unlearn the bad habits
  48. that PASCAL produces in programmers. I have had to "deprogram" many
  49. a PASCAL person over the years by yanking them away from their
  50. safety nets and comfort zones and explain to them the real life
  51. fact that PASCAL assumes you don't know the rules and enforces them
  52. in that manner. In C it presumes a knowledge of the rules and there
  53. are no safety nets when you break them. PASCAL was designed solely
  54. for the purpose of teaching structured programming as espoused by
  55. Tom DeMarco, Richard West, et al. C was written in 1969 for the
  56. express purpose of providing a general purpose Operating Systems
  57. language that was portable, (spelled UNIX).
  58.  
  59. C++ takes the idea of a C structure and enforces the concept of
  60. data hiding ontop of an already working system. Object Oriented
  61. Programming can be done in C or C++, it is just that C++ has some
  62. features that make it a little easier.
  63.  
  64. >>2) We want to do most of our programming on our 386-33 PC running MSDOS 5.0.
  65. >>   What C-type compilers exist for the PC?  Which ones are better?  How much
  66. >>   do they cost and where can one get them at a discount?
  67. >
  68. >    Well, if you are doing normal DOS programming, I would probably stick
  69. >with either Borland C++ 3.1 or Microsoft's C++ (7.0?). They are the two most
  70. >common and you will find alot more written for those two compilers... I think
  71. >there was a thread on this newsgroup discussin the two. I can't say I have
  72. >ever used Microsoft, so I cant speak for it, but I have been happy with
  73. >Borland for the most part.
  74. >
  75. Either compiler is ok, but I prefer Borland's compiler at the
  76. moment. It is very stable and provides a nice environment for
  77. development. Microsoft C 7.0 is also not too bad. For a C compiler
  78. it is very good, and the amount of fine tuning you can do with the
  79. compiler and the linker is nothing short of amazing. Those features
  80. will become useful later as your experience grows. Zortec and
  81. Watcom also produce good tight EXEs and are not bad from a
  82. developmental standpoint.
  83.  
  84. >>3) How robust is C compared to Fortran for purely number crunching, scientific
  85. >>   type applications on the PC?
  86. >
  87. >    No solid evidence, but my engineer friend uses Fortran for his
  88. >classes instead of C.
  89. >
  90.  
  91. It's actually better than FORTRAN in many instances, since the
  92. actual number crunching and mathematical algorithyms can be
  93. expressed in a hand tuned fashion that makes it utilize the
  94. calculating power of the machine more efficiently. If you don't
  95. wish to roll your own math functions, an extensive math library is
  96. generally provided and third party vendors extend that capability
  97. even further.
  98.  
  99. Engineers tend to use FORTRAN more by tradition and schooling,
  100. rather than an absolute need for the language.
  101.  
  102. >>4) What books would you recommend in learning C (my wife might want to take
  103. >>   classes - I do better teaching myself)?  And of course, since I will be
  104. >>   doing programming on a PC, what books would you recommend that are
  105. >>   specific to that platform, especially w.r.t. memory management as well
  106. >>   as graphics?
  107. >
  108. >     Well, when I went from Basic to C (one of the best moves I ever made :)
  109. >I used to book called "C:step-by-step" by Waite & Prata. It is a very good
  110. >book for basic C.... I still use it now when I have to clarify something.
  111. >It doesn't cover C++ at all, though, so if you want to learn that you might
  112. >want to look for something else.
  113.  
  114. Good Book. Also you might want to look into such books at Workout
  115. C, C the Complete Reference, The C Answer Book, Learning C by Augie
  116. Hansen, (comes with tutorial disk). The list goes on and on. The
  117. best place I have found for books is Software Etc, Egghead, and any
  118. techinal book stores in your area.
  119.  
  120. >
  121. >
  122. >>Much thanks for your help/advice.
  123. >
  124. >>Jon Noring
  125. >
  126. >Just my $.02
  127. >
  128. >Chad R. Collins
  129. >collins@blkbox.com
  130. >
  131.  
  132.  
  133. -- 
  134. --------------------------------------------------------------------
  135.             Bureaucracy: noun, plural - Bureaucracies.
  136.          The process of turning energy into solid waste.
  137. ---------------------------------------------------------------------
  138.