home *** CD-ROM | disk | FTP | other *** search
- 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
- Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer,comp.sys.ibm.pc.programmer,comp.lang.c++,comp.lang.c
- Path: sparky!uunet!sequent!muncher.sequent.com!furballs
- From: furballs@sequent.com (Paul Penrod)
- Subject: Re: Newbie Wants Advice on C-Programming
- Message-ID: <1992Dec24.230420.4243@sequent.com>
- Sender: usenet@sequent.com (usenet )
- Nntp-Posting-Host: crg8.sequent.com
- Organization: Sequent Computer Systems, Inc.
- References: <1992Dec23.220530.15347@netcom.com> <1992Dec24.154204.25248@blkbox>
- Date: Thu, 24 Dec 92 23:04:20 GMT
- Lines: 124
-
- In article <1992Dec24.154204.25248@blkbox> collins@blkbox (Chad R. Collins) writes:
- >noring@netcom.com (Jon Noring) writes:
- >
- >>Hello,
- >
- >>My wife, who is a database analyst working with DB2, etc. (all IBM mainframe
- >>stuff), is now interested in learning C programming because of pending changes
- >>at the company she works. I, too, have an interest in learning C - I'd like to
- >>be able to write programs to solve a variety of problems (I've done a lot of
- >>fairly complex scientific programming with, heaven-forbid, Fortran, so I do
- >>have some general programming experience).
- >
- >>Since both of us are newbies in this area, I'd like some advice as well as
- >>answers to the following questions:
- >
- >>1) There seems to exist C, as well as C++, and possibly other variants. What
- >> are the differences between these? Which should we learn first?
- >
- > Well, C is basically a subset of C++.... anything you write in C
- >should be compatible with C++. C++ is an extension of C, which primarily adds
- >objects. Personally, I prefer C becuase it is well standardized and I frankly
- >think most of what C++ adds is a waste of time. However, alot of people would
- >disagree with me, so you might want to look into who and what around you
- >will be learning. I think if you learn C first you will be safe, just becase
- >C works with C++ and not vice versa.
- >
-
- Well, C may be syntactically a subset of C++, but it requires a
- different line of thinking. C is basically a high level assembler
- with the ability to produce functional blocks more precisely than
- Assembly.
-
- In a previous post, some suggested you learn PASCAL first. I don't
- think so. You can learn C without having to unlearn the bad habits
- that PASCAL produces in programmers. I have had to "deprogram" many
- a PASCAL person over the years by yanking them away from their
- safety nets and comfort zones and explain to them the real life
- fact that PASCAL assumes you don't know the rules and enforces them
- in that manner. In C it presumes a knowledge of the rules and there
- are no safety nets when you break them. PASCAL was designed solely
- for the purpose of teaching structured programming as espoused by
- Tom DeMarco, Richard West, et al. C was written in 1969 for the
- express purpose of providing a general purpose Operating Systems
- language that was portable, (spelled UNIX).
-
- C++ takes the idea of a C structure and enforces the concept of
- data hiding ontop of an already working system. Object Oriented
- Programming can be done in C or C++, it is just that C++ has some
- features that make it a little easier.
-
- >>2) We want to do most of our programming on our 386-33 PC running MSDOS 5.0.
- >> What C-type compilers exist for the PC? Which ones are better? How much
- >> do they cost and where can one get them at a discount?
- >
- > Well, if you are doing normal DOS programming, I would probably stick
- >with either Borland C++ 3.1 or Microsoft's C++ (7.0?). They are the two most
- >common and you will find alot more written for those two compilers... I think
- >there was a thread on this newsgroup discussin the two. I can't say I have
- >ever used Microsoft, so I cant speak for it, but I have been happy with
- >Borland for the most part.
- >
- Either compiler is ok, but I prefer Borland's compiler at the
- moment. It is very stable and provides a nice environment for
- development. Microsoft C 7.0 is also not too bad. For a C compiler
- it is very good, and the amount of fine tuning you can do with the
- compiler and the linker is nothing short of amazing. Those features
- will become useful later as your experience grows. Zortec and
- Watcom also produce good tight EXEs and are not bad from a
- developmental standpoint.
-
- >>3) How robust is C compared to Fortran for purely number crunching, scientific
- >> type applications on the PC?
- >
- > No solid evidence, but my engineer friend uses Fortran for his
- >classes instead of C.
- >
-
- It's actually better than FORTRAN in many instances, since the
- actual number crunching and mathematical algorithyms can be
- expressed in a hand tuned fashion that makes it utilize the
- calculating power of the machine more efficiently. If you don't
- wish to roll your own math functions, an extensive math library is
- generally provided and third party vendors extend that capability
- even further.
-
- Engineers tend to use FORTRAN more by tradition and schooling,
- rather than an absolute need for the language.
-
- >>4) What books would you recommend in learning C (my wife might want to take
- >> classes - I do better teaching myself)? And of course, since I will be
- >> doing programming on a PC, what books would you recommend that are
- >> specific to that platform, especially w.r.t. memory management as well
- >> as graphics?
- >
- > Well, when I went from Basic to C (one of the best moves I ever made :)
- >I used to book called "C:step-by-step" by Waite & Prata. It is a very good
- >book for basic C.... I still use it now when I have to clarify something.
- >It doesn't cover C++ at all, though, so if you want to learn that you might
- >want to look for something else.
-
- Good Book. Also you might want to look into such books at Workout
- C, C the Complete Reference, The C Answer Book, Learning C by Augie
- Hansen, (comes with tutorial disk). The list goes on and on. The
- best place I have found for books is Software Etc, Egghead, and any
- techinal book stores in your area.
-
- >
- >
- >>Much thanks for your help/advice.
- >
- >>Jon Noring
- >
- >Just my $.02
- >
- >Chad R. Collins
- >collins@blkbox.com
- >
-
-
- --
- --------------------------------------------------------------------
- Bureaucracy: noun, plural - Bureaucracies.
- The process of turning energy into solid waste.
- ---------------------------------------------------------------------
-