Introduction

A

Alf P. Steinbach

* Ralathor:
Can you give me a tip for a good online guide for C/C++
along with what I should start with...

I don't want to spend money on books as long as there is a
place called "The world wide web" where anybody can write a
guide for anyone to acsess without paying...

The C++ FAQ is a good place to start.

You might check out the FAQ item ‹What other "newbie" guides are there
for me?›, currently at <url:
http://www.parashift.com/c++-faq-lite/newbie.html#faq-29.21>.

Obviously I'm a bit biased in recommending that, since I'm the author of
the only tutorial/guide currently referred to by that item, currently at
<url: http://home.no.net/dubjai/win32cpptut/html/>. Unfortunately I
haven't had the time to bring that tutorial further; it's been on hold
for about a year, I think it is now. One exception: I added a small
separate document on using pointers, currently at <url:
http://home.no.net/dubjai/win32cpptut/special/pointers/ch_01.pdf>, <url:
http://home.no.net/dubjai/win32cpptut/special/pointers/ch_01_examples.zip>.

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
 
G

Gene Bushuyev

I think it is better to learn C before u learn c++ . Ofcourse there are
some books which explain c++ without prior knowledge on c . In my
opinion u anyhow need to learn c concepts to leran c++. So better learn
c.


I very much disagree. Though for historical reasons many C++ programmers are
former C programmers, it doesn't make C expertise a prerequisite or even
desirable. The worst C++ programmers I've seen all came with a strong C
background. I tend to agree with Bertrand Meyer's advice, "beware of C hackers."

--
Gene Bushuyev (www.gbresearch.com)
----------------------------------------------------------------
To see what is in front of one's nose needs a constant struggle ~ George Orwell


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
 
D

Dave

desirable. The worst C++ programmers I've seen all came with a strong C
background. I tend to agree with Bertrand Meyer's advice, "beware of C hackers."

I taught myself C before learning C++ and I think it makes me a better
C++ programmer. Being a C programmer first teaches you how to
accomplish things explicitly what C++ does implicitly. It makes you
aware of the hidden costs of various C++ features. C++ can be a bad
language to use for speed critical applications if you are not aware of
all the little things that C++ automatically does (e.g. auto
constructors, destructors, copy construction, etc). If you don't have
that awareness then you can make dumb mistakes that rob your apps of
speed.

I don't think it necessarily hurts you to learn C first. I still think
it is important to understand machine organization to be a good
programmer. (That's also why I think the Universities using Java as
their primary language in C.S. are doing a disservice to the
students---but that's a whole other debate.)

The reason some C hackers are bad with C++ is because they have
focussed on learning the C++ lanuage and not on learning OOP
methodologies. IMO, learning the language and learning OOP design are
two completely different things. After programming C++ for a couple
years, I started reading OOP design books by Meyers, Koenig, Moo, and
Alexandrescu. It took my game to a whole new level.

If I was teaching somebody how to program, I would probably teach them
the following languages in this order:

1. Basic or Pascal---these are good starting languages that teach
variables, functions, and thinking algorithmically. IMO, starting with
functional languages is easiest for people to grasp.

2. C---this is the "next level" when it comes to functional languages.
I would teach basic machine organization, memory, pointers, and data
structures with it.

3. Python or Ruby--these are easy OOP languages to learn. I would use
them to introduce higher-order OOP concepts such as classes,
inheritence, and polymorphism.

4. C++---lastly, I would teach them C++ to bring everything together:
the machine organization, memory management, and OOP concepts and
design.

Note how I alternated loosely typed with strongly typed languages.
That's an important "background" topic to always be talking about
through the whole process.

Dave


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
 
H

Holger Sebert

Dave wrote:
[...]
>
> 1. Basic or Pascal---these are good starting languages that teach
> variables, functions, and thinking algorithmically. IMO, starting with
> functional languages is easiest for people to grasp.
>
> 2. C---this is the "next level" when it comes to functional languages.
> I would teach basic machine organization, memory, pointers, and data
> structures with it.
>
[...]

Just a little confusion:
AFAIK, the programming languages you listed are not /funtional/ languages, but
/imperative/ languages. One difference is that in true functional languages
like, e.g., Haskell or ML you do not have variables and assignments, so you have
to implement things like loops using recursion.

- Holger

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
 
J

Jerry Coffin

[ ... ]
The reason some C hackers are bad with C++ is because they have
focussed on learning the C++ lanuage and not on learning OOP
methodologies.

There's a lot more to C++ than OOP. Somebody who chose to concentrate
on generic programming (for one example) might learn to use C++ quite
well without learning anything about OOP or OOD (at least IMO).

[ ... ]
1. Basic or Pascal---these are good starting languages that teach
variables, functions, and thinking algorithmically. IMO, starting with
functional languages is easiest for people to grasp.

A short note on terminology: in programming, "functional" has a
fairly widely agreed-upon meaning, and neither BASIC nor Pascal fits
very closely with that meaning at all.

Sometime when you're bored or curious, you might want to look ML,
Haskell, Lisp, or (if you want to delve into history) FP. Many people
find functional programming difficult to grasp (I certainly did at
first) but I think it's well worth the time and effort to do so.
Learning functional programming to a reasonable degree will probably
change your perspective on programming far more than learning all the
languages you listed.

--
Later,
Jerry.

The universe is a figment of its own imagination.

[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
 
L

Le Chaud Lapin

Dave said:
If I was teaching somebody how to program, I would probably teach them
the following languages in this order:

1. Basic or Pascal---these are good starting languages that teach
variables, functions, and thinking algorithmically. IMO, starting with
functional languages is easiest for people to grasp.

How about 1.5 - Assembly Language?

Once you "get it" and have a good feeling for what "it" is,
essentially, it makes sense to expand ones knowledge right up to the
boundary where it does not make sense to go any further. Electrical
engineers have an inherent advantage here - there are certain nuances
of low-level programming that might mystify a traditional programmer
but would not confuse an electrical engineer. For example, in a
recently class in C++ at a large software corporation, I ask, "What
does 64-bit mean anyway?", and only 2 of 17 students were able to
answer. It was a bit embarrassing, as many of them had studied
computer science. I think every C/C++ programmer should be well-versed
in at least one assembly language. The boundary is very sharp and
terminal, and knowing assembly language (and hence computer
architecture) will make disccusions about many elements of C++ a lot
more pleasant.
2. C---this is the "next level" when it comes to functional languages.
I would teach basic machine organization, memory, pointers, and data
structures with it.

3. Python or Ruby--these are easy OOP languages to learn. I would use
them to introduce higher-order OOP concepts such as classes,
inheritence, and polymorphism.

Ufff! Why waste time on these languaes?. Life is short. Go to the
good stuff hard and fast. If anything, it is easier to learn downhill
than to learn uphill.
4. C++---lastly, I would teach them C++ to bring everything together:
the machine organization, memory management, and OOP concepts and
design.

Note how I alternated loosely typed with strongly typed languages.
That's an important "background" topic to always be talking about
through the whole process.

Yep. The most desirable objective in all of programming, IMO, is to
achieve a good form in the resulting system. Since type is that which
facilitates structure, an affinity for type is generally better than
the the "it's just all data" philosophy.

-Le Chaud Lapin-


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
 
L

lancediduck

Ralathor said:
Hello everyone.

I just wanted to introduce myself, and maby get a few of you...

Well, anyway...

I am pretty new to programming...
The most important thing is to find an easy, forgiving enviroment to
play in. For example, If you are using Microsoft computer, then try
Microsoft Visual Studio 8 Express (this is the one I use when not doing
systems programming on UNIX). Or if you are on Linux get the Eclispe
IDE which have plug ins for the gnu compilers and debuggers.
There are very few people approaching C++ from C nowadays. More likely,
they are coming from Java. Both language have a similiar syntax, but
C++ enables far far more.


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
 
F

Francis Glassborow

The most important thing is to find an easy, forgiving enviroment to
play in. For example, If you are using Microsoft computer, then try
Microsoft Visual Studio 8 Express (this is the one I use when not
doing
systems programming on UNIX). Or if you are on Linux get the Eclispe
IDE which have plug ins for the gnu compilers and debuggers.
There are very few people approaching C++ from C nowadays. More
likely,
they are coming from Java. Both language have a similiar syntax, but
C++ enables far far more.

Well I prefer JGrasp (for just about all platforms) + G++ (but you can
use other compilers if you like) or Al Stevens' Quincy IDE (only for MS
Windows machines) if you are really new because it is a much simpler IDE
which means that the learner is not distracted by having to cope with
making errors in using the IDE.


--
Francis Glassborow ACCU
Author of 'You Can Do It!' and "You Can Program in C++"
see http://www.spellen.org/youcandoit
For project ideas and contributions: http://www.spellen.org/
youcandoit/projects


[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
 
J

Jorgen Grahn

Ralathor said:
I have tried searching on google, but i moastly found the
"differences",
not the strenghts and weaknesses.

Probably because there aren't any. What would you say is the strength
or a weakness of a hammer? [that's a rhetorical question]

.... which means someone will inevitably answer it ;-)

Strengths:
- cheap to manufacture
- widely known and spread
- easy to operate
- possible to improvise using low-tech (stick and rock)
- versatile (anything you want to smash, you can use a hammer)
- non-blunt end open for extension (nail removal add-on)
- no non-renewable fuel needed
...

Weaknesses:
- does not scale; needs to be light enough to lift
- may cause thumb injury
...

I could go on with this mental exercise for hours, and it would be even
easier if I had something to compare it /with/, like a rock or a nailgun.

Sure C and C++ have strengths and weaknesses. They may be fuzzier than a
hammer's and harder to agree on, but they are there. It's a relevant
question.

/Jorgen
 
V

Victor Bazarov

Jorgen said:
Ralathor said:
I have tried searching on google, but i moastly found the
"differences",
not the strenghts and weaknesses.

Probably because there aren't any. What would you say is the
strength or a weakness of a hammer? [that's a rhetorical question]

... which means someone will inevitably answer it ;-)

Strengths:
[..]

Weaknesses:
[..]

I could go on with this mental exercise for hours, [..]

The only thing it illustrates is that such enumeration is useful
as a "mental exercise" (whatever that means to you). There is no
use for such enumeration in the real world.

What we should be asking is, "Is C++ suitable to implement A?" or
"Is there any other tool (or language) that is more suitable when
implementing A?" Yes, to answer *those* questions you might need
to understand the strengths or/and weaknesses, but without a goal
or a target naming strengths or weaknesses is a waste of time.
Sure C and C++ have strengths and weaknesses. They may be fuzzier
than a
hammer's and harder to agree on, but they are there. It's a relevant
question.

It's about as relevant as "is there a correlation between how people
are named and what their lives are like?" Can we answer this? Yes.
And some people actually make a career out of answering that. Is
there any [real-life] use for the answer? Not IMO.

V
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top