By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,187 Members | 1,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,187 IT Pros & Developers. It's quick & easy.

Stupid C++ ?

P: n/a
Hello,
I know nothing about C++ but want to get started.
Is there any good free C++ program that I can try to see if I like
programming? I also need a good free compiler. I don't want to
purchased the regular VB C++ until I know that I will like it.
Any help would be appreciated.
Thanks

Hoops
Nov 5 '05 #1
Share this Question
Share on Google+
36 Replies


P: n/a
Hoopster wrote:
I know nothing about C++ but want to get started.
Is there any good free C++ program that I can try to see if I like
programming? I also need a good free compiler. I don't want to
purchased the regular VB C++ until I know that I will like it.


www.google.com

V
Nov 5 '05 #2

P: n/a

"Hoopster" <ho*************@aol.com> wrote in message
news:9g********************************@4ax.com...
Hello,
I know nothing about C++ but want to get started.


Here's the FAQ from the 'learners' newsgroup,
alt.comp.lang.learn.c-c++
http://www.comeaucomputing.com/learn/faq/

I think you'll find it useful.

-Mike
Nov 5 '05 #3

P: n/a
I also need a good free compiler. I don't want to

purchased the regular VB C++ until I know that I will like it.
Hoops


Google for MinGw or gcc(g++) for windows - I am assuming you are on
windows... Linux usually comes with dev tools like gcc or g++, if not
you can download them.

Nov 5 '05 #4

P: n/a
Hoopster schrieb:
Hello,
I know nothing about C++ but want to get started.
Buy a book. Good recommendations could be available here, depending on
your knowledge level of programming in general. I got started with
programming in general and C++ in particular with the "Standard C++
bible" from Clayton Walnum & Al Stevens. I still refer to this book.
Is there any good free C++ program that I can try to see if I like
programming? I also need a good free compiler. I don't want to
There are heaps of programs out there. Take a look at
www.sourceforge.net and browse the software map (top of page) for
projects by programming language. You can download them as source and/or
binary, read the source and learn...
purchased the regular VB C++ until I know that I will like it.


VB and C++ are _very_ different - although Microsoft doesn't state this
so clearly in their advertisments. Also, Visual C++ is different from
Standard C++, it is more of an "proprietary extended subset". You should
learn _Standard_ C++ first, before stepping into M$ extensions.
For this I can recommend MingW: http://www.mingw.org/. It is a
completely free set of compilers and other tools you need for
programming. The really good thing about it is, that you will find these
tools on other operating systems as well, if you ever want or need to
hack on a different platform than Win (which is more fun, by the way).

There is also a free IDE, which brings the compilers and tools from
MingW together and gives you an easy start to them - Dev-Cpp:
http://www.bloodshed.net/. I recommend to download and install this.
Take a few steps in the environment, write some
'std::cout << "hello world" << std::endl;' programs, get a feeling on
the language and how Dev-Cpp invokes the compiler and linker. Then, try
the compiler invocation by yourself on a cmd and use an editor to write
your programs. By this you learn how compilers work step by step - a
very important experience! All compilers work similar, so if you ever
run Visual C++ later, you will find that their compiler works the same
way as g++ from MingW, apart from slightly different command line options.

Have fun, so far ;-)
Eckhard
Nov 5 '05 #5

P: n/a
Victor Bazarov schrieb:

www.google.com


What an arrogant answer.
If he had wanted to know this, he wouldn't have come here.
Eckhard
Nov 5 '05 #6

P: n/a
Eckhard Lehmann wrote:
Victor Bazarov schrieb:

www.google.com
What an arrogant answer.
If he had wanted to know this, he wouldn't have come here.
Eckhard


That is not an arrogant answer, if you just type "free c++ compiler
windows" ( which was what was required), you will get enough results -
Doing your own "homework" is the motto of the group I guess :-)

BTW, I do appreciate the time you that took out and listed out the
details in your latest post :-)

Sandeep
Buy a book. Good recommendations could be available here, depending on
your knowledge level of programming in general. I got started with
programming in general and C++ in particular with the "Standard C++
bible" from Clayton Walnum & Al Stevens. I still refer to this book. Is there any good free C++ program that I can try to see if I like
programming? I also need a good free compiler. I don't want to

There are heaps of programs out there. Take a look at
www.sourceforge.net and browse the software map (top of page) for
projects by programming language. You can download them as source and/or
binary, read the source and learn...
.........

..............
..............Have fun, so far ;-) Eckhard


Nov 5 '05 #7

P: n/a
Sandeep schrieb:
What an arrogant answer.
If he had wanted to know this, he wouldn't have come here.

That is not an arrogant answer, if you just type "free c++ compiler
windows" ( which was what was required), you will get enough results -
Doing your own "homework" is the motto of the group I guess :-)


Yes, that is the first step, of course. But his question was not about
"any free compiler", it was about "a good free compiler" and "advice on
how to start learning C++".
You know how it is to stand in front of a huge heap of information
(which maybe comes out of google) - and you don't know where to start
and how to digest it? I am sure you do... ;-). It is even more
complicted if you don't have any clue of the topic so far.

BTW, I do appreciate the time you that took out and listed out the
details in your latest post :-)


You're welcome :-). During the week I don't have time to do this, but on
the weekend...
Eckhard
Nov 5 '05 #8

P: n/a
Eckhard Lehmann wrote:
Sandeep schrieb:
What an arrogant answer.
If he had wanted to know this, he wouldn't have come here.

>

That is not an arrogant answer, if you just type "free c++ compiler
windows" ( which was what was required), you will get enough results -
Doing your own "homework" is the motto of the group I guess :-)


Yes, that is the first step, of course. But his question was not about
"any free compiler", it was about "a good free compiler" and "advice on
how to start learning C++".


And if he had used any of this quotes with google, He'd already had the
exact same answers he got here on the first result page(s).

This might sound arrogant, but really, using google (or any other search
engine) is such a basic skill nowadays that one should really know how to
use it. And with use it I mean that one should be able to gain basic
knowledge of a completely unfamiliar topic with it. I mean it is not rocket
science, it just takes a bit of time and patience.

Furthermore this question pops up about once a week, so searching the
archives or the FAQ would be a good idea, two.

I think it is common courtesy not to ask a question, if you have not spend
at least an hour to answer it yourself.

Fabio



Nov 5 '05 #9

P: n/a
Ken
I like Dev-C++ from bloodshed software. It is small and installs quick
and does what I need. Oh and it has a rather nice gui and it will let
you write a quick program and compile without setting up a project.

www.bloodshed.com is where to get it. I dont know if it is the
greatest compiler on earth but I think it is a great place to start
because I've found it rather friendly.

I only recommend one book and that is The Ansi C Programming language
by Brian W. Kerninghan and Dennis M. ritchie.

People here I am sure will say that the book isn't C++. Well it isn't
but having the best C book there is on the chaps desk wont kill him
will it? This book is a terrific reference for C. You should know the
C syntax well! It will make you a better C++ programmer. (I feel I
need to defend this from people before they descend on my like
vultures... I am not telling him to go practice C for years and have
entrenched C thinking but a few months of C without all the extra C++
semantics will help him out a lot before he adds all that stuff).

You will need some basic intro to C++ book too. Maybe one of those 21
days books or C++ for dummies. Read the reviews on amazon.com. For
the experts... these books are not useful in the long run because
people outgrow them very quick and they are next to useless for
reference later because they are so verbose but they have a place for
the inexperienced.

Nov 5 '05 #10

P: n/a
In article <11**********************@g14g2000cwa.googlegroups .com>,
Ken <ke*@kenmcwilliams.com> wrote:
I like Dev-C++ from bloodshed software. It is small and installs quick
and does what I need. Oh and it has a rather nice gui and it will let
you write a quick program and compile without setting up a project.

www.bloodshed.com is where to get it. I dont know if it is the
greatest compiler on earth but I think it is a great place to start
because I've found it rather friendly.

I only recommend one book and that is The Ansi C Programming language
by Brian W. Kerninghan and Dennis M. ritchie.

People here I am sure will say that the book isn't C++. Well it isn't
but having the best C book there is on the chaps desk wont kill him
will it? This book is a terrific reference for C. You should know the
C syntax well! It will make you a better C++ programmer. (I feel I
need to defend this from people before they descend on my like
vultures... I am not telling him to go practice C for years and have
entrenched C thinking but a few months of C without all the extra C++
semantics will help him out a lot before he adds all that stuff).
K&R is a good C book, and yes, some parts of C are indeed
applicable to C++. However, some parts are not. And some
parts are not the way you would do it in C++ as a first choice.
So while you are definitely not telling him to go practice
C for years, the problem is that he _does_ want to know some
of the C++ semantics, and you're tossing that out the window.
You will need some basic intro to C++ book too. Maybe one of those 21
days books or C++ for dummies. Read the reviews on amazon.com. For
the experts... these books are not useful in the long run because
people outgrow them very quick and they are next to useless for
reference later because they are so verbose but they have a place for
the inexperienced.


If they are not useful they by definition that do not have a place
for the experienced or inexperienced.
--
Greg Comeau / Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Nov 5 '05 #11

P: n/a
"Ken" <ke*@kenmcwilliams.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
I like Dev-C++ from bloodshed software. It is small and installs quick
and does what I need. Oh and it has a rather nice gui and it will let
you write a quick program and compile without setting up a project.

www.bloodshed.com is where to get it. I dont know if it is the
greatest compiler on earth but I think it is a great place to start
because I've found it rather friendly.

I only recommend one book and that is The Ansi C Programming language
by Brian W. Kerninghan and Dennis M. ritchie.

People here I am sure will say that the book isn't C++.
And they'd be correct.
Well it isn't
but having the best C book there is on the chaps desk wont kill him
will it?
No, but it will not teach C++.
This book is a terrific reference for C.
Agreed. But OP asked about C++, not C. They're two completely
separate, distinct languages.
You should know the
C syntax well!
Someone desiring to learn C++ should learn the C++ syntax.
The fact that this syntax is similar to that of another
language is irrelevant.
It will make you a better C++ programmer.
I must disagree. Quite often, syntax shared by C and
C++ has different semantics. This will only serve to
confuse and confound the novice were he to try to apply
the rules of one language while learning another.
(I feel I
need to defend this from people
Defend away. I assure you it's a losing proposition.
before they descend on my like
vultures...
Metaphors are not necessary. Post inaccurate or questionable
advice, and you *will* be challenged.
I am not telling him to go practice C for years and have
entrenched C thinking
But you are advising someone to try learning C++ from
a C textbook. This is simply extremely poor, harmful
advice.
but a few months of C without all the extra C++
semantics
Semantics of C++ which differ from those of C are not
'extra', they're *different*. That is one of the most
important reasons for not trying to learn C++ from a
C book. Another important reason is that in order to
use C++ most effectively, many of the idioms common to
C do not apply.
will help him out a lot before he adds all that stuff).
It will harm much more than help.
You will need some basic intro to C++ book too.
Not 'too', but *instead*.
Maybe one of those 21
days books
Most experts will tell folks to avoid such books. I don't
consider myself 'expert', but I do agree with them.
or C++ for dummies.
IMO someone who admits to himself that he's a 'dummy'
by purchasing such a book should not be attempting
programming. Programming is *not* for 'dummies'.
It's for those who desire to acquire problem-solving
skills.
Read the reviews on amazon.com.
I suggest that he not do that. Such reviews will suffer
from one or both of these flaws:

-Written by or for those with a financial interest in the
book(s)

-Written by novices who are not qualified to assess
technical information on a subject with which they're
ignorant.

Much higher quality reviews are available at www.accu.org
and are written by acknowledged experts.
For
the experts... these books are not useful in the long run because
people outgrow them very quick and they are next to useless for
reference later because they are so verbose but they have a place for
the inexperienced.


They have no place for either group.
'Easy' rarely equates with 'correct' or 'best'.
-Mike
Nov 5 '05 #12

P: n/a
> People here I am sure will say that the book isn't C++.

Unless I'm misremembering, no less an authority that Stroustrup has
said that pretty much every single program in K&R is also valid and
respectable C++. It may not be the canonical C++ way or the preferred
C++ way, but it is _a_ C++ way.

That said:
It will make you a better C++ programmer.


Sure, the same way learning LISP made me a better C++ programmer.
Learning a different language and a different way of thinking about
problems generally helps you out across-the-board.

But let's keep in mind that's what you're doing when you advise people
to learn C. You're advising them to learn a different language and a
different way of thinking about problems. That's all well and good if
someone's asking you "how do I become a better C++ programmer?", but
it's pretty unhelpful when someone is asking you "how do I learn C++?"

If I were to tell people to learn C++ by picking up _Structure and
Interpretation of Computer Programs_, that would be viewed as a pretty
nonhelpful answer, right?

Nov 6 '05 #13

P: n/a
Mike Wahler schrieb:
People here I am sure will say that the book isn't C++.


And they'd be correct.
Well it isn't
but having the best C book there is on the chaps desk wont kill him
will it?


No, but it will not teach C++.


The K&R book will not teach C++, but it will teach programming - better
than any other book I've seen so far for any language. Well, I don't
know about Knuth's "The Art of computer programming" volumes, they are
relatively expensive.
I agree that C != C++. I was developing thousands of lines of C code and
almost the same amount in Java, so I thought it would be no problem to
switch to C++... and I royally stranded ;-).
Well, now after some research it is much better and I start to like the
language.

But, what holds true anyway is, that both languages can be mixed
seamlessly in software projects (which is a great advantage) - and often
they are. So, in practice you don't get around a more or less deep
understanding of C, even if you never write a complete C program.
Eckhard
Nov 6 '05 #14

P: n/a
In article <43***********************@news.freenet.de>,
Eckhard Lehmann <ec****@web.de> wrote:
Mike Wahler schrieb:
People here I am sure will say that the book isn't C++. And they'd be correct.
Well it isn't
but having the best C book there is on the chaps desk wont kill him
will it?


No, but it will not teach C++.


The K&R book will not teach C++, but it will teach programming - better
than any other book I've seen so far for any language. Well, I don't
know about Knuth's "The Art of computer programming" volumes, they are
relatively expensive.


TCPL certainly holds its place firming in computing history.
Otherwise, it's not clear at all what you're saying.
I agree that C != C++. I was developing thousands of lines of C code and
almost the same amount in Java, so I thought it would be no problem to
switch to C++... and I royally stranded ;-).
Well, now after some research it is much better and I start to like the
language.
Great. Given lanuage X, Y and Z, such a situation often happens
between 2 of them, of 2 of them "against" the 3rd. This can occur
for many reason.
But, what holds true anyway is, that both languages can be mixed
seamlessly in software projects (which is a great advantage) - and often
they are. So, in practice you don't get around a more or less deep
understanding of C, even if you never write a complete C program.


This is probably not false, but probably misses the point.
On the one end of the spectrum it's important to be open-minded
and diverse, but on the other end, it's also worth focusing on
certain things too. So, for instance, it may be so that some
projects are some hybrid, sometimes purposely sometimes not,
but could it have been better in any ways with the same constraints?
Often it can be. So while we can talk about possible benefits
of knowing C well to do C++ programming, and knowing C++ well to
do C programming, and some other combo's thereof, that can often
spell a mismatch and whatever ramifications from that come about.

You mention C and C++ and Java above. I certainly hope each language
helped in your programming skills, to appreciate what each offers,
including new style of programming, etc, but to expect each to be
equal is not sound. And although I'd consider it a plus for a project
in a new language you were to do a job in, it would be naive
to expect you to just immediately be able to pick up and program
in it, to know all it's nooks and crannies, to be able to understand
its new style, to be able to be efficient in its idioms, etc etc etc.
Therefore, I would expect you to explicitly pick up manuals and
tutorials on it, it all it means, and then give you the appropriate
time to get up to speed with it.
--
Greg Comeau / Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Nov 6 '05 #15

P: n/a
Greg Comeau schrieb:
The K&R book will not teach C++, but it will teach programming - better
than any other book I've seen so far for any language. Well, I don't
know about Knuth's "The Art of computer programming" volumes, they are
relatively expensive.

TCPL certainly holds its place firming in computing history.
Otherwise, it's not clear at all what you're saying.


Regarding the "Art of computer programming" I mean, that I just didn't
buy the book so far and can not judge about it's content. I heard that
it must be good, but I don't know.

Great. Given lanuage X, Y and Z, such a situation often happens
between 2 of them, of 2 of them "against" the 3rd. This can occur
for many reason.
All three share the same elements, (where Java and C++ borrowed them
from C). You can not avoid trying to map your knowledge from one
language to another - that is the same as with real, spoken languages
;). But your compiler will tell you that early, even more when you
compile with -Wall -Werror.
But, what holds true anyway is, that both languages can be mixed
seamlessly in software projects (which is a great advantage) - and often
they are. So, in practice you don't get around a more or less deep
understanding of C, even if you never write a complete C program.

This is probably not false, but probably misses the point.
On the one end of the spectrum it's important to be open-minded
and diverse, but on the other end, it's also worth focusing on
certain things too. So, for instance, it may be so that some
projects are some hybrid, sometimes purposely sometimes not,
but could it have been better in any ways with the same constraints?
Often it can be. So while we can talk about possible benefits


Always almost it can not. When you have such a case, it might have one
or many of the following reasons (there might be others as well):

- functionality is not available in the language of choice
- functionality can not be easily implemented in the language of choice
- functionality is already implemented in another language, and it's too
expensive (time consuming, lack of know-how) to reimplement it in the
language of choice.

Often the third reason is the one for mixing C with C++. There are many
useful libraries in C around which you can just use from C++ without
changing it. BTW you can't do that with Java, you have to create
wrappers, build JNI extensions / learn CORBA or whatever overhead...
You mention C and C++ and Java above. I certainly hope each language
helped in your programming skills, to appreciate what each offers,
including new style of programming, etc, but to expect each to be
equal is not sound. And although I'd consider it a plus for a project
I don't expect them to be equal, the only mistake I made was, that I
expected C++ to be more equal to C than it actually is.
in a new language you were to do a job in, it would be naive
to expect you to just immediately be able to pick up and program
in it, to know all it's nooks and crannies, to be able to understand
its new style, to be able to be efficient in its idioms, etc etc etc.
I learned each of these three languages earlier, otherwise it would be
really hard. The first one was, btw, C++, in the basics and four years
ago. Never used it for real world projects until now, and now had to
recall some things and to extend my knowledge.
But I think that the programming style depends more on the programmer(s)
than on the language - you can write clean and easy to understand C code
as well as ugly and obscure Java - it's up to you ;).
The idioms of object oriented programming (hmm, "class oriented" fits
better) are quite equal between Java and C++. So, regarding this there
is not much new to me.
Therefore, I would expect you to explicitly pick up manuals and
tutorials on it, it all it means, and then give you the appropriate
time to get up to speed with it.


That's what I do :).
Eckhard
Nov 6 '05 #16

P: n/a
In article <43***********************@news.freenet.de>,
Eckhard Lehmann <ec****@web.de> wrote:
Greg Comeau schrieb:
The K&R book will not teach C++, but it will teach programming - better
than any other book I've seen so far for any language. Well, I don't
know about Knuth's "The Art of computer programming" volumes, they are
relatively expensive.


TCPL certainly holds its place firming in computing history.
Otherwise, it's not clear at all what you're saying.


Regarding the "Art of computer programming" I mean, that I just didn't
buy the book so far and can not judge about it's content. I heard that
it must be good, but I don't know.


I was referring to the claim that K&R is the best book for
teaching programming.
Great. Given lanuage X, Y and Z, such a situation often happens
between 2 of them, of 2 of them "against" the 3rd. This can occur
for many reason.


All three share the same elements, (where Java and C++ borrowed them
from C). You can not avoid trying to map your knowledge from one
language to another - that is the same as with real, spoken languages
;). But your compiler will tell you that early, even more when you
compile with -Wall -Werror.


My compiler? Sorry, it does not use those options :)
The problem in this discussion in not the shared elements,
it's the key insights and significance of the differences!
Similarly, it's important to be able to cross knowledge,
but to not do it judiciously and within its limits is another story.
But, what holds true anyway is, that both languages can be mixed
seamlessly in software projects (which is a great advantage) - and often
they are. So, in practice you don't get around a more or less deep
understanding of C, even if you never write a complete C program.

This is probably not false, but probably misses the point.
On the one end of the spectrum it's important to be open-minded
and diverse, but on the other end, it's also worth focusing on
certain things too. So, for instance, it may be so that some
projects are some hybrid, sometimes purposely sometimes not,
but could it have been better in any ways with the same constraints?
Often it can be. So while we can talk about possible benefits


Always almost it can not. When you have such a case, it might have one
or many of the following reasons (there might be others as well):

- functionality is not available in the language of choice
- functionality can not be easily implemented in the language of choice
- functionality is already implemented in another language, and it's too
expensive (time consuming, lack of know-how) to reimplement it in the
language of choice.

Often the third reason is the one for mixing C with C++. There are many
useful libraries in C around which you can just use from C++ without
changing it. BTW you can't do that with Java, you have to create
wrappers, build JNI extensions / learn CORBA or whatever overhead...


If we are talking about the same thing, my experience differs in
what can and can not often occur. As to mixing, nobody is disputing
any of the possible issues.
You mention C and C++ and Java above. I certainly hope each language
helped in your programming skills, to appreciate what each offers,
including new style of programming, etc, but to expect each to be
equal is not sound. And although I'd consider it a plus for a project


I don't expect them to be equal, the only mistake I made was, that I
expected C++ to be more equal to C than it actually is.


But that's the point that (I think it was) Mike made, relating
to that each language is distinct, and shouldn't necessarily be
taught as the other.
in a new language you were to do a job in, it would be naive
to expect you to just immediately be able to pick up and program
in it, to know all it's nooks and crannies, to be able to understand
its new style, to be able to be efficient in its idioms, etc etc etc.


I learned each of these three languages earlier, otherwise it would be
really hard. The first one was, btw, C++, in the basics and four years
ago. Never used it for real world projects until now, and now had to
recall some things and to extend my knowledge.
But I think that the programming style depends more on the programmer(s)
than on the language - you can write clean and easy to understand C code
as well as ugly and obscure Java - it's up to you ;).
The idioms of object oriented programming (hmm, "class oriented" fits
better) are quite equal between Java and C++. So, regarding this there
is not much new to me.


Lots of issues can and should be language neutral.
And yet it does matter.
--
Greg Comeau / Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Nov 7 '05 #17

P: n/a
> I was referring to the claim that K&R is the best book for
teaching programming.
That was not claim, I just said that I haven't found another book for
any programming language that teaches _programming_ as good as K&R. The
book goes beyond the scope of teaching the C language, it handles
common principles and practices in programming and gives C
implementations as examples. It also gives insight into standard
library implementations, shows the basics of parsers (don't get me
wrong here, I mean the _basics_) and system interfaces, introduces
binary and sequencial search, tree structures and other things. Besides
that it gives very good exercises for kowledge-hungry readers. Not
everyone might rate all this this high, but I do.
There might be good books out there, maybe even better books for
teaching programming in general (thats why I mentioned "The art of
computer programming"), but I don't know them. I was surprised that a C
book is so good in teaching general aspects and idioms...
;). But your compiler will tell you that early, even more when you
compile with -Wall -Werror.


My compiler? Sorry, it does not use those options :)


The "you" was meant more in general... -Wall = show all warnings,
-Werror = treat warnings as errors. Your compiler surely has options
for that ;-)?
The problem in this discussion in not the shared elements,
it's the key insights and significance of the differences!


The key insights and significance of differences are important when it
comes to the details, yes. But there are general principles and idioms
of programming that apply to every language. Learning "programming" and
learning "a programming lanugage" are not the same. You can always
learn a new "programming language", but you have to understand
"programming" first.
I don't expect them to be equal, the only mistake I made was, that I
expected C++ to be more equal to C than it actually is.


But that's the point that (I think it was) Mike made, relating
to that each language is distinct, and shouldn't necessarily be
taught as the other.


That is absolutely right. But in the case of C and C++ there is one
fact that no one can discuss away: C is a subset of C++. If we like it
or not. That's why the languages are more similar than any other two
programming languages.
My point of view is: if he want's to learn "C++", he should really
learn C++ and not C. If he wants to learn "programming in C++", he
should also learn C++, and furthermore should also gain knowledge and
experience in problem solving, mathemathics, algorithms, data
structures, development tools and so on. If he wants to learn
"programming" in general and independent of any particular language, he
should aquire knowledge in the things I mentioned in the last sentence,
should do that in depth and put the language second. And for that, K&R
is IMHO not too bad - although there could be better books of which I
don't know.
Eckhard

Nov 7 '05 #18

P: n/a
In article <11**********************@g47g2000cwa.googlegroups .com>,
<ec****@web.de> wrote:
I was referring to the claim that K&R is the best book for
teaching programming.
That was not claim, I just said that I haven't found another book for
any programming language that teaches _programming_ as good as K&R.


It's pointless to get into a match when we are clearly both
talking about the same claim.
The
book goes beyond the scope of teaching the C language, it handles
common principles and practices in programming and gives C
implementations as examples. It also gives insight into standard
library implementations, shows the basics of parsers (don't get me
wrong here, I mean the _basics_) and system interfaces, introduces
binary and sequencial search, tree structures and other things. Besides
that it gives very good exercises for kowledge-hungry readers. Not
everyone might rate all this this high, but I do.
There might be good books out there, maybe even better books for
teaching programming in general (thats why I mentioned "The art of
computer programming"), but I don't know them. I was surprised that a C
book is so good in teaching general aspects and idioms...


Indeed. And not to detract from it, but there is also tons of
other issue not even delved into. For instance, have a look at
TC++PL. My point is not to say T++PL is "better", just that there
is many other issues, especially high level issues, which TCPL
does not even touch. Again, this does not negate the guidances
it does offer.
;). But your compiler will tell you that early, even more when you
compile with -Wall -Werror.


My compiler? Sorry, it does not use those options :)


The "you" was meant more in general... -Wall = show all warnings,
-Werror = treat warnings as errors. Your compiler surely has options
for that ;-)?


In particular, for the benefit of those reading this who may
not know, that's what some of gcc's opptions are.
IOWs, that statements was: Some compiler can tell you more
when you turn on some of it's command line options, pragma's,
radio switches, etc. which ones depending upon the compiler.
The problem in this discussion in not the shared elements,
it's the key insights and significance of the differences!


The key insights and significance of differences are important when it
comes to the details, yes. But there are general principles and idioms
of programming that apply to every language. Learning "programming" and
learning "a programming lanugage" are not the same. You can always
learn a new "programming language", but you have to understand
"programming" first.
I don't expect them to be equal, the only mistake I made was, that I
expected C++ to be more equal to C than it actually is.


But that's the point that (I think it was) Mike made, relating
to that each language is distinct, and shouldn't necessarily be
taught as the other.


That is absolutely right. But in the case of C and C++ there is one
fact that no one can discuss away: C is a subset of C++. If we like it
or not. That's why the languages are more similar than any other two
programming languages.
My point of view is: if he want's to learn "C++", he should really
learn C++ and not C. If he wants to learn "programming in C++", he
should also learn C++, and furthermore should also gain knowledge and
experience in problem solving, mathemathics, algorithms, data
structures, development tools and so on. If he wants to learn
"programming" in general and independent of any particular language, he
should aquire knowledge in the things I mentioned in the last sentence,
should do that in depth and put the language second. And for that, K&R
is IMHO not too bad - although there could be better books of which I
don't know.


Minus nitpicks, something like that seemed to be the claims that
were being negated. Since it's not, then there is violent agreement.
--
Greg Comeau / Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Nov 7 '05 #19

P: n/a
Y2J

Greg Comeau wrote:
In article <11**********************@g47g2000cwa.googlegroups .com>,
<ec****@web.de> wrote:
I was referring to the claim that K&R is the best book for
teaching programming.
That was not claim, I just said that I haven't found another book for
any programming language that teaches _programming_ as good as K&R.


It's pointless to get into a match when we are clearly both
talking about the same claim.
The
book goes beyond the scope of teaching the C language, it handles
common principles and practices in programming and gives C
implementations as examples. It also gives insight into standard
library implementations, shows the basics of parsers (don't get me
wrong here, I mean the _basics_) and system interfaces, introduces
binary and sequencial search, tree structures and other things. Besides
that it gives very good exercises for kowledge-hungry readers. Not
everyone might rate all this this high, but I do.
There might be good books out there, maybe even better books for
teaching programming in general (thats why I mentioned "The art of
computer programming"), but I don't know them. I was surprised that a C
book is so good in teaching general aspects and idioms...


Indeed. And not to detract from it, but there is also tons of
other issue not even delved into. For instance, have a look at
TC++PL. My point is not to say T++PL is "better", just that there
is many other issues, especially high level issues, which TCPL
does not even touch. Again, this does not negate the guidances
it does offer.
;). But your compiler will tell you that early, even more when you
compile with -Wall -Werror.

My compiler? Sorry, it does not use those options :)


The "you" was meant more in general... -Wall = show all warnings,
-Werror = treat warnings as errors. Your compiler surely has options
for that ;-)?


In particular, for the benefit of those reading this who may
not know, that's what some of gcc's opptions are.
IOWs, that statements was: Some compiler can tell you more
when you turn on some of it's command line options, pragma's,
radio switches, etc. which ones depending upon the compiler.
The problem in this discussion in not the shared elements,
it's the key insights and significance of the differences!


The key insights and significance of differences are important when it
comes to the details, yes. But there are general principles and idioms
of programming that apply to every language. Learning "programming" and
learning "a programming lanugage" are not the same. You can always
learn a new "programming language", but you have to understand
"programming" first.
I don't expect them to be equal, the only mistake I made was, that I
expected C++ to be more equal to C than it actually is.

But that's the point that (I think it was) Mike made, relating
to that each language is distinct, and shouldn't necessarily be
taught as the other.


That is absolutely right. But in the case of C and C++ there is one
fact that no one can discuss away: C is a subset of C++. If we like it
or not. That's why the languages are more similar than any other two
programming languages.
My point of view is: if he want's to learn "C++", he should really
learn C++ and not C. If he wants to learn "programming in C++", he
should also learn C++, and furthermore should also gain knowledge and
experience in problem solving, mathemathics, algorithms, data
structures, development tools and so on. If he wants to learn
"programming" in general and independent of any particular language, he
should aquire knowledge in the things I mentioned in the last sentence,
should do that in depth and put the language second. And for that, K&R
is IMHO not too bad - although there could be better books of which I
don't know.


Minus nitpicks, something like that seemed to be the claims that
were being negated. Since it's not, then there is violent agreement.
--
Greg Comeau / Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?


A question for Greg Comeau:

I have worked through a book that teaches C++ and I am now working on a
second one by "Dietel", I have also been starting to read this book
titled "The Algoritm design manual".
My question to you is because you seem to have a good understanding
about the ebb and flow of the programming industry.

One of my friends works for a company in Canada called "Sasktel" as a
programmer, making 55,000 per year CDN. He was telling me that C++ is
not a computer language worth learning and would be a waste of my time
to even bother doing it. He told me to learn Java instead and in
particular learn about "Struts".

But my intuition tells me to continue with the C++ track and finish
what I had first started to learn and go from there afterwards, I
wanted to learn Assembly once finishing C++ and then possibly learning
J2EE. Am I being to close minded to this persons suggestions?

I mean I find it overwhelming to try to get a straight answer anywhere
I look, some articles say this or that language is the "One to learn"
and everything else is worthless. The only article I found of any use
was one talking about jumping from graphics program to graphics
program. It stated that none of them are important when it comes to
learning the "How to" of it all. It suggested learn just one really
well first and then it would be possible to learn another if it was
necessary.
From what I have read from "The Certified Ethical Hacker" course

materials, nothing is secure in itself absolutely. I have read various
articles with claims that C++ is the best possible language to learn
when it comes to building gaming software that run on UNIX servers. I
reasoned that a higher level language such as Java, J2EE or some
scripting language was good to learn, but for a chance to get a job in
the future as a programmer it would be very helpful to learn a
intermediate language such as C++.

I don't know what to think some days as I study the books, I start to
question myself on my choices and begin to wonder if I ought to give up
learning C++ and just learn some simpler scripting language instead?
But I just keep going and even though the more I learn the more I
sometimes feel lost and disorientated, somehow I still believe that it
might not be worth it in the short run, but in the long haul it will
payoff for me. Honestly what do you think about the learning path I
have set down and am following daily? Am I misleading myself and will I
end up out in the weeds in the end?

Nov 11 '05 #20

P: n/a
In article <11**********************@z14g2000cwz.googlegroups .com>,
Y2J <ja****@accesscomm.ca> wrote:
A question for Greg Comeau:

I have worked through a book that teaches C++ and I am now working on a
second one by "Dietel", I have also been starting to read this book
titled "The Algoritm design manual".
My question to you is because you seem to have a good understanding
about the ebb and flow of the programming industry.

One of my friends works for a company in Canada called "Sasktel" as a
programmer, making 55,000 per year CDN. He was telling me that C++ is
not a computer language worth learning and would be a waste of my time
to even bother doing it. He told me to learn Java instead and in
particular learn about "Struts".

But my intuition tells me to continue with the C++ track and finish
what I had first started to learn and go from there afterwards, I
wanted to learn Assembly once finishing C++ and then possibly learning
J2EE. Am I being to close minded to this persons suggestions?

I mean I find it overwhelming to try to get a straight answer anywhere
I look, some articles say this or that language is the "One to learn"
and everything else is worthless. The only article I found of any use
was one talking about jumping from graphics program to graphics
program. It stated that none of them are important when it comes to
learning the "How to" of it all. It suggested learn just one really
well first and then it would be possible to learn another if it was
necessary.
Accto the naysayers, the demise of C++ has continued for ~20 years.
Obviously they are wrong. Can C++ continue so strong for another
~20 years? Who knows. But today to say that C++ is not worth
learning doesn't make sense. It's still strong.

Now, does it make sense to learn something else instead?
It could, I don't know your situation.
Also, does it make sense to learn something else at some point?
Always.

You've mentioned both C++ and Java: both markets are lucrative.
Somebody saying otherwise is the one who is closed minded.
From what I have read from "The Certified Ethical Hacker" course

materials, nothing is secure in itself absolutely. I have read various
articles with claims that C++ is the best possible language to learn
when it comes to building gaming software that run on UNIX servers. I
reasoned that a higher level language such as Java, J2EE or some
scripting language was good to learn, but for a chance to get a job in
the future as a programmer it would be very helpful to learn a
intermediate language such as C++.


There is certainly many C++ jobs. Whether they are for you,
are available in your geographic area, your sought industry, etc
is another story.
I don't know what to think some days as I study the books, I start to
question myself on my choices and begin to wonder if I ought to give up
learning C++ and just learn some simpler scripting language instead?
But I just keep going and even though the more I learn the more I
sometimes feel lost and disorientated, somehow I still believe that it
might not be worth it in the short run, but in the long haul it will
payoff for me. Honestly what do you think about the learning path I
have set down and am following daily? Am I misleading myself and will I
end up out in the weeds in the end?


I don't think you are misleading yourself. Furthermore, I think
it's ok to a certain point to question yourself. Generally speaking
you should be ok both in the short and long term with C++.
Specifically speaking, you probably don't offer enough details
for us to access. That said, something that is leaping out
between your lines is that you are not sure if your current
path is a complete mistake. That's the feeling I get, correct
me if I'm wrong. If that is one of your underlying concerns,
I just don't see it as a legitimate one. The C++ industry
is still strong. Competition will always come and go,
and competition will always come and stay. I think that's fine.
I suspect you're seeking this as black and white right now,
but it will be multiple choice, as it has always been.
Go carve yourself something good.
--
Greg Comeau / Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Nov 22 '05 #21

P: n/a
While Greg's response is certainly worth reading, there are another
couple of dimensions to this question which haven't been looked at
quite yet.

Yes, it's probably true that there's more market demand today for Java
programmers than for C++ programmers. This is maybe indicative of
something, or maybe indicative of nothing, and in the end it doesn't
really matter. Doing something just because it's marketable is a
recipe for modest financial success at the cost of personal disaster.
Far better to do something because you enjoy it _and_ because you can
get a job doing it.

Insofar as the articles you've read saying this-or-that language is the
one to learn and everything else is worthless, consider Bjarne
Stroustrup's words: "I would consider belief in the One True Way to be
a childhood disease, if I didn't know so many adults who suffer from
it." (I'm paraphrasing slightly--the quote is somewhere in TC++PL.)

You'll always find people who will loudly and with great certainty
proclaim what's Absolute Truth. Many of these people work as
technology pundits. Take it all with a large grain of salt.

So. For the learning path you've set for yourself, my best advice is
to follow the stuff you find interesting and fun, and worry later about
whether or not it's marketable. If you're going down the path of C++,
well, hey--great. Most of us here think it's worth learning, and would
happy to walk down the path with you. :)

Nov 22 '05 #22

P: n/a
Y2J

Robert J. Hansen wrote:
While Greg's response is certainly worth reading, there are another
couple of dimensions to this question which haven't been looked at
quite yet.

Yes, it's probably true that there's more market demand today for Java
programmers than for C++ programmers. This is maybe indicative of
something, or maybe indicative of nothing, and in the end it doesn't
really matter. Doing something just because it's marketable is a
recipe for modest financial success at the cost of personal disaster.
Far better to do something because you enjoy it _and_ because you can
get a job doing it.

Insofar as the articles you've read saying this-or-that language is the
one to learn and everything else is worthless, consider Bjarne
Stroustrup's words: "I would consider belief in the One True Way to be
a childhood disease, if I didn't know so many adults who suffer from
it." (I'm paraphrasing slightly--the quote is somewhere in TC++PL.)

You'll always find people who will loudly and with great certainty
proclaim what's Absolute Truth. Many of these people work as
technology pundits. Take it all with a large grain of salt.

So. For the learning path you've set for yourself, my best advice is
to follow the stuff you find interesting and fun, and worry later about
whether or not it's marketable. If you're going down the path of C++,
well, hey--great. Most of us here think it's worth learning, and would
happy to walk down the path with you. :)


I had read this article by Charles Petzold and he said " The real
objective is for us to become faster programmers, which also means that
it's cheapening our labor."

I suppose this might be one reason that people are geared towards
moving up to higher level programming languages, to be faster is to be
the one who in the end might find employment in the field.

Personally I don't know if I agree with this philosophy myself, so many
things claim to give you the upper hand when it comes to something. But
I think it is better to be slow and steady than fast and sloppy when it
comes to doing anything worthwhile in life.

In the years gone past I have seen many people who had pursued various
certifications in the computer industry only to still not be able to
secure a job in spite of all their certifications.

I find it somewhat disturbing to see that people pour so many of their
financial resources and time into something that in the end will yield
little to no results. I had asked people I know that have learned
programming and I have found that many of them are quite arrogant when
it comes to giving any useful advice.

Right now I am using visual studio 6.0 to work through my programming
book, I have no idea what 90% of the features are used for. But I am
learning on a daily basis some things that are new. I had studied a
little about algorithms apart from the two I had learned of in my last
book which are the "bubble sort and quick sort".

In the book I am now working on Dietell C++, I find it to be helpful in
teaching various ways that syntax is actually done and why it is done
that way. I had looked through the message board archieves and took
note of various books that where being suggested reading and have
secured electronic copies of these books.

I thank both Greg Comeau and Robert J. Hansen for their input to my
questions I had asked of them. To be honest it was the first time I
asked a question and actually had recieved some encouraging coments on
what I had asked.

I had asked this one guy who "proclaims" he is a master programmer last
week, he had all kinds of reasons why studying algoritms is a complete
waste of time, but as I had walked away I just "took it with a grain of
salt" like what was mentioned previously.

I don't want to get caught up in a "fad" with all the rest of the
lemmings running headlong into the abyss. I have been learning the
basics about "Psuedocode" and eventually I will be learning "UML" from
the book I am working on right now.

I know that C++ might be a little more challenging to learn than other
programming languages out there, just because something is challenging
is not a valid reason to not work through it. Like I had read in one
posting, someone had said, "There is no such thing as a free lunch".

I had felt better after having a couple of people who postively
commented on learning C++ and I suppose that is all I had needed to
hear, perhaps I will not find a job as a C++ programmer, but then again
maybe I will also. When I had went to technical school in 1989 in
Vancouver for a one year network technician course, the teacher there
had said, "Do what you love, and eventually you can't help but make
money doing it!"

That has always stuck in my mind as a motivator in the hard times, I
think ethusiasm might be the one ingredient that is needed to help a
person to success in any endevor they set off to accomplish.

It would seem to me that there are an awful lot of software engineers
as opossed to real programmers, therefore a programmer can make a far
better software engineer, than a software engineer can fill the role of
an actual computer programmer.

I look at things as if what I learn today will in some part be useful
to me in the future or will it not? There are an awful lot of books
out there today for sure, so many to choose from it is overwhelming for
someone like myself at times.

I had read this book in 1999 (in part) about Java and when I had
realized that a person could actually build software on their home
computer I felt as if I had died and gone to heaven. I mean, I didn't
know how software was actually created even though I had been through
technical school. I just learned about how to engineer software and
really nothing more.

Ever since I had come to understand that a person could build programs,
I was deeply intrigued by it all; but then came the reality of learning
a suitable language that would in time help me to understand how to
realize the ideas I had about building various types of software.

I have tried different languages, VB, Java, Torque game engine, and
then I had to get real with myself and learn C++ as it would seem it
might be the only language that is flexible enough for a person to be
able to build software the way they want to build it.

At any rate I am grateful for the input I have recieved from various
people both the good and the not so good feed back. I am glad that was
able to put a question out there and in cyber space someone returned
the with decent answer.

Peace, Jaret

Nov 22 '05 #23

P: n/a
Y2J <ja****@accesscomm.ca> wrote:
I had asked this one guy who "proclaims" he is a master programmer last
week, he had all kinds of reasons why studying algoritms is a complete
waste of time, but as I had walked away I just "took it with a grain of
salt" like what was mentioned previously.


Good for you. As I see it, algorithms are the very basis of computer
science, and programming is just translating these algorithms into a
language the computer can understand. Programming is easy; it's getting
the algorithms right that can be tricky.

I wonder what kind of "reasons" he would have for not studying
algorithms.

--
Marcus Kwok
Nov 22 '05 #24

P: n/a
In article <dl**********@news-int.gatech.edu>,
Marcus Kwok <ri******@gehennom.net> wrote:
...Programming is easy; ...


??
--
Greg Comeau / Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Nov 22 '05 #25

P: n/a
Greg Comeau <co****@panix.com> wrote:
In article <dl**********@news-int.gatech.edu>,
Marcus Kwok <ri******@gehennom.net> wrote:
...Programming is easy; ...


??


"Programming is easy; it's getting the algorithms right that can be
tricky."

Sorry, that comment was meant to be tongue-in-cheek.
With a sufficiently detailed algorithm, translating it to code
"should be" fairly trivial.

--
Marcus Kwok
Nov 22 '05 #26

P: n/a
Once upon a time (Dienstag, 15. November 2005 19:37) Marcus Kwok wrote
some very nice things
Greg Comeau <co****@panix.com> wrote:
In article <dl**********@news-int.gatech.edu>,
Marcus Kwok <ri******@gehennom.net> wrote:
...Programming is easy; ...


??


"Programming is easy; it's getting the algorithms right that can be
tricky."

Sorry, that comment was meant to be tongue-in-cheek.
With a sufficiently detailed algorithm, translating it to code
"should be" fairly trivial.

If it is trivial, why are there so many people posting their questions
here? It does not seem to be as easy as you say.
Nov 22 '05 #27

P: n/a
In article <dl**********@news-int2.gatech.edu>,
Marcus Kwok <ri******@gehennom.net> wrote:
Greg Comeau <co****@panix.com> wrote:
In article <dl**********@news-int.gatech.edu>,
Marcus Kwok <ri******@gehennom.net> wrote:
...Programming is easy; ...


??


"Programming is easy; it's getting the algorithms right that can be
tricky."

Sorry, that comment was meant to be tongue-in-cheek.
With a sufficiently detailed algorithm, translating it to code
"should be" fairly trivial.


"should be' ?? :)
--
Greg Comeau / Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Nov 22 '05 #28

P: n/a
Sebastian Wiesner <Ba***********@gmx.net> wrote:
Once upon a time (Dienstag, 15. November 2005 19:37) Marcus Kwok wrote
some very nice things
"Programming is easy; it's getting the algorithms right that can be
tricky."

Sorry, that comment was meant to be tongue-in-cheek.
With a sufficiently detailed algorithm, translating it to code
"should be" fairly trivial.

If it is trivial, why are there so many people posting their questions
here? It does not seem to be as easy as you say.


Sebastian,
First, let me apologize for the misinterpretation. My comment was meant
to be taken as a light-hearted joke. I did not intend to offend
anybody, or to come across as arrogant.

That being said, the way I look at it, "computer science" (CS) involves
such things as language design, data structure analysis, algorithms,
design methodologies, etc.; and "programming" is translating the efforts
of computer science into a language that the computer can understand.
(I mentioned "language design"; I would say that "language design" would
be CS, but "using the language to write a program" would be
programming). I consider them to be separate, though related, concepts.
I would say that "programming" is a component of CS, but not necessarily
essential to CS.

Thinking abstractly, one can envision a brilliant Computer Scientist who
knows nothing about programming because he doesn't know any specific
languages; he invents fantastic data structures and algorithms, but
describes them all in pseudocode. On the other hand, you can imagine
someone who, given a program specification and design, can code it up
nicely, but who lacks the skill to help with the design.

To become a good "programmer", one should become proficient in both
"computer science" and "programming".

In my experience, the CS is the tricky part, but once you have a good
design that takes advantage of intelligent data structures and
algorithms, then programming it is usually pretty straightforward.

Many of the questions here are asking, "What is wrong with my program?
Why doesn't it do what I want?" The answer is usually some subtle logic
error, hence an algorithm error, hence, CS and not "programming", per se.
(I hope I didn't paint myself into a corner over a subtle joke)

--
Marcus Kwok
Nov 22 '05 #29

P: n/a
Once upon a time (Dienstag, 15. November 2005 22:53) Marcus Kwok wrote
some very nice things
Sebastian Wiesner <Ba***********@gmx.net> wrote:
Once upon a time (Dienstag, 15. November 2005 19:37) Marcus Kwok wrote
some very nice things
"Programming is easy; it's getting the algorithms right that can be
tricky."

Sorry, that comment was meant to be tongue-in-cheek.
With a sufficiently detailed algorithm, translating it to code
"should be" fairly trivial.
If it is trivial, why are there so many people posting their questions
here? It does not seem to be as easy as you say.


Sebastian,
First, let me apologize for the misinterpretation. My comment was meant
to be taken as a light-hearted joke. I did not intend to offend
anybody, or to come across as arrogant.


Marcus,
first let me make clear, that you did neither offend me nor did you come
across as arrogant. I am sorry, if my comment did sound as if you had
done this.
I just did not understand, what made you say "Programming is easy" and I
wanted to point out, that there are many people, that seem to have to
cope with a great deal of problems, when trying to program. But your
posting was clarifying.

That being said, the way I look at it, "computer science" (CS) involves
such things as language design, data structure analysis, algorithms,
design methodologies, etc.; and "programming" is translating the efforts
of computer science into a language that the computer can understand.
(I mentioned "language design"; I would say that "language design" would
be CS, but "using the language to write a program" would be
programming). I consider them to be separate, though related, concepts.
I would say that "programming" is a component of CS, but not necessarily
essential to CS.
ack.

Thinking abstractly, one can envision a brilliant Computer Scientist who
knows nothing about programming because he doesn't know any specific
languages; he invents fantastic data structures and algorithms, but
describes them all in pseudocode. On the other hand, you can imagine
someone who, given a program specification and design, can code it up
nicely, but who lacks the skill to help with the design.

To become a good "programmer", one should become proficient in both
"computer science" and "programming".
Of course, but my experience shows me, that people are often too much
focused to one part and forgot to think about the other.
This leads to good code implementing a horribly bad designed data model,
or into a great data model translated into "bad" code.

In my experience, the CS is the tricky part, but once you have a good
design that takes advantage of intelligent data structures and
algorithms, then programming it is usually pretty straightforward.
I must agree that computer science is a really tricky part, but I have
also had problems when translating a quite useful algorithm into *good*
code.
You will always be able to translate your data model and your algorithms
into almost anything, but translating them into *good* code, is the
actual problem. That part be really tricky.

Many of the questions here are asking, "What is wrong with my program?
Why doesn't it do what I want?" The answer is usually some subtle logic
error, hence an algorithm error, hence, CS and not "programming", per
se.
Yes, but you also find many questions on how to translate a "data model"
into *good* C++ code.


(I hope I didn't paint myself into a corner over a subtle joke)


No, you did not, and let me apologize again, if my posting made you think
so.
Nov 22 '05 #30

P: n/a
Sebastian Wiesner <Ba***********@gmx.net> wrote:
Once upon a time (Dienstag, 15. November 2005 22:53) Marcus Kwok wrote
some very nice things
In my experience, the CS is the tricky part, but once you have a good
design that takes advantage of intelligent data structures and
algorithms, then programming it is usually pretty straightforward.


I must agree that computer science is a really tricky part, but I have
also had problems when translating a quite useful algorithm into *good*
code.
You will always be able to translate your data model and your algorithms
into almost anything, but translating them into *good* code, is the
actual problem. That part be really tricky.
Many of the questions here are asking, "What is wrong with my program?
Why doesn't it do what I want?" The answer is usually some subtle logic
error, hence an algorithm error, hence, CS and not "programming", per
se.


Yes, but you also find many questions on how to translate a "data model"
into *good* C++ code.


OK, I'll accept that. I guess since I've only been in the "real world"
for a little over a year now, and my projects have only been of medium
complexity so far, I jumped to a premature conclusion. Most of my
issues at work have been dealing with old C code that has been around
since the 1970's, so simplifying/redesigning them to take advantage of
newer language features has been the bulk of my job.
(I hope I didn't paint myself into a corner over a subtle joke)


No, you did not, and let me apologize again, if my posting made you think
so.


Thanks.

--
Marcus Kwok
Nov 22 '05 #31

P: n/a
Y2J
The kinds of reasons he had, were that they are already inlcuded in the
classes that he works with and there was no need to bother trying to
understand them for that reason.
I know C++ has an Algorithm header file, but it doesn't make any sense
for me to not learn about what algorithms do because how will I know if
I am using the best one for what I am building?

Learning about algoritms I have found is like learning chess with chess
master which I have for the PS2, it has these puzzles and asks you to
pick the best choice for attaining a certain goal. Sometimes I find it
to be a real "brain burner" trying to figure out which is the right one
to choose, but it teaches me to not be inflexible in my thinking and
try to keep it as pliable as possible.

Programming for me at this point is not easy, I make little charts and
graphs to remember the many different syntax's and keywords. I got all
the control structures pretty much understood, but now I am trying to
learn about things like pointers.

Which seem relatively easy in theory, but it practice can seem (more
than a little) confusing. One thing I realized was that I was having
trouble understanding was the difference between variable names and the
values witin those names being passed back and forth like a ping pong
ball.

I totally figured out the "bubble sort" algorithm, but the "quick sort"
algoritm is still somewhat perplexing and I get a little lost trying to
follow the values and get confused a little more with the pointers and
where they are pointing to.

I can see the complexity of C++ is very diverse in its and perhaps it
is because of this that I find at times I get a little confused what is
going on in the source code. I don't know if it is possible to learn
the C++ language to the point that a person could actually pick up a
page(s) of code and read it as if they where reading a book?

I hope this is possible one day for me to do in some small part, I did
try to look at some code libraries on the net to get a better
understanding about the logical flow of it all, but it seemed to me
that I ought to swim like hell back to the more shallow part of the
pool where I could paddle around for awhile.

I had read an article on visual studio net where this person had said
that it is good, but knowing the how to write a program from scratch is
much better in the long run. They had said that it keeps a person from
developing and individual style of writing code and curbs creative
thinking, does anyone agree with this point?

What really makes an expert programmer? Is it their style or is it
their tools that they use? Or perhaps it might be the style in which
they use their particular tools to compliment their personal
preferences? I don't know as I am far from being an "Expert" I am sure
the more I come to know, the more I will come to understand I actually
know very little. Any input would be apprehiated, thank you for your
comments thus far as I find them to be encouraging as I work my way
through learning how to go from concept to code and from code to a new
concept.

Nov 22 '05 #32

P: n/a
Y2J
The kinds of reasons he had, were that they are already inlcuded in the
classes that he works with and there was no need to bother trying to
understand them for that reason.
I know C++ has an Algorithm header file, but it doesn't make any sense
for me to not learn about what algorithms do because how will I know if
I am using the best one for what I am building?

Learning about algoritms I have found is like learning chess with chess
master which I have for the PS2, it has these puzzles and asks you to
pick the best choice for attaining a certain goal. Sometimes I find it
to be a real "brain burner" trying to figure out which is the right one
to choose, but it teaches me to not be inflexible in my thinking and
try to keep it as pliable as possible.

Programming for me at this point is not easy, I make little charts and
graphs to remember the many different syntax's and keywords. I got all
the control structures pretty much understood, but now I am trying to
learn about things like pointers.

Which seem relatively easy in theory, but it practice can seem (more
than a little) confusing. One thing I realized was that I was having
trouble understanding was the difference between variable names and the
values witin those names being passed back and forth like a ping pong
ball.

I totally figured out the "bubble sort" algorithm, but the "quick sort"
algoritm is still somewhat perplexing and I get a little lost trying to
follow the values and get confused a little more with the pointers and
where they are pointing to.

I can see the complexity of C++ is very diverse in its and perhaps it
is because of this that I find at times I get a little confused what is
going on in the source code. I don't know if it is possible to learn
the C++ language to the point that a person could actually pick up a
page(s) of code and read it as if they where reading a book?

I hope this is possible one day for me to do in some small part, I did
try to look at some code libraries on the net to get a better
understanding about the logical flow of it all, but it seemed to me
that I ought to swim like hell back to the more shallow part of the
pool where I could paddle around for awhile.

I had read an article on visual studio net where this person had said
that it is good, but knowing the how to write a program from scratch is
much better in the long run. They had said that it keeps a person from
developing and individual style of writing code and curbs creative
thinking, does anyone agree with this point?

What really makes an expert programmer? Is it their style or is it
their tools that they use? Or perhaps it might be the style in which
they use their particular tools to compliment their personal
preferences? I don't know as I am far from being an "Expert" I am sure
the more I come to know, the more I will come to understand I actually
know very little. Any input would be apprehiated, thank you for your
comments thus far as I find them to be encouraging as I work my way
through learning how to go from concept to code and from code to a new
concept.

Nov 22 '05 #33

P: n/a
Y2J <ja****@accesscomm.ca> wrote:
The kinds of reasons he had, were that they are already inlcuded in the
classes that he works with and there was no need to bother trying to
understand them for that reason.
Ugh.
I know C++ has an Algorithm header file, but it doesn't make any sense
for me to not learn about what algorithms do because how will I know if
I am using the best one for what I am building?
Exactly. For example, say you have a list of numbers stored in an array
(or std::vector if you prefer), and the list is known to be sorted. To
search for a particular number, you could use the naive linear search by
looking at every element until you find it; or you could realize that it
was sorted, therefore you would be able to perform a binary search,
which would on average improve the search time considerably, especially
for large lists. The data is the same, but a change in algorithm can
have significant impacts.

In fact, when optimizing programs, the biggest gains are usually made by
improving the algorithms or data structures used; small tweaks (called
"peephole optimization" by some), such as replacing (2 * x) with (x +
x), usually do not make a significant difference and make the code
harder to understand. Really, when you write code, you should really be
writing it so that it can be easily understood by another person; you're
not really writing it for the computer. And besides, compilers are good
enough now that it can probably optimize the code way better than most
programmers would be able to anyway. There is the quote (often
attributed to Donald Knuth), "Premature optimization is the root of all
evil." http://www.cookcomputing.com/blog/archives/000084.html for more
info.
Learning about algoritms I have found is like learning chess with chess
master which I have for the PS2, it has these puzzles and asks you to
pick the best choice for attaining a certain goal. Sometimes I find it
to be a real "brain burner" trying to figure out which is the right one
to choose, but it teaches me to not be inflexible in my thinking and
try to keep it as pliable as possible.
You seem to have the right attitude. Computer Science can be seen as
somewhat of an art, and a certain amount of creativity can go a long
way when you are designing programs/algorithms/data structures.
I can see the complexity of C++ is very diverse in its and perhaps it
is because of this that I find at times I get a little confused what is
going on in the source code. I don't know if it is possible to learn
the C++ language to the point that a person could actually pick up a
page(s) of code and read it as if they where reading a book?
If the code is well-written, then I would say, "yes". Of course, even
for an expert, code that is not well-written can be just as cryptic.
For examples in C, you can check out the International Obfuscated C Code
Contest (IOCCC, http://www.ioccc.org/ )
I hope this is possible one day for me to do in some small part, I did
try to look at some code libraries on the net to get a better
understanding about the logical flow of it all, but it seemed to me
that I ought to swim like hell back to the more shallow part of the
pool where I could paddle around for awhile.
Yes, don't bite off more than you can chew. Learning at your own pace
can be extremely effective, as long as it doesn't cause you to become
lazy and dawdle around (someone else made this same point earlier
somewhere, maybe not in this thread).
I had read an article on visual studio net where this person had said
that it is good, but knowing the how to write a program from scratch is
much better in the long run. They had said that it keeps a person from
developing and individual style of writing code and curbs creative
thinking, does anyone agree with this point?
Are you talking about the article, "Does Visual Studio Rot the Mind?" by
Charles Petzold?
http://charlespetzold.com/etc/DoesVi...otTheMind.html

He does make a pretty good point:

Some observers of our digital lives have noticed the way in which
certain applications cause a user to think in very rigid prescribed
ways, and these are not good. One of the biggest offenders, of
course, is PowerPoint. Start putting what you want to communicate in
PowerPoint slides, and everything you want to say is ordered into
half a dozen bullet items.

and then he goes into how IntelliSense and Visual Studio do the same
thing to a programmer: IntelliSense encourages bottom-up design in
order to use it to its full potential (so that it knows about the names
you want to use), and VS will auto-generate considerable amounts of
code that may not have the best design, but then people see it and
assume that it's the "best" way to do it, so they start conforming to
the same practices.
What really makes an expert programmer? Is it their style or is it
their tools that they use? Or perhaps it might be the style in which
they use their particular tools to compliment their personal
preferences?
I would say it's probably closer to the last statement. I think the
main thing is that an expert knows how to use his tools properly and
efficiently, and is able to select the appropriate tool for the right
job. In other words, to mutilate a common saying, they know that when
they have a hammer in their hand, then not necessarily everything is a
nail, so they should go find their screwdriver.
I am sure
the more I come to know, the more I will come to understand I actually
know very little.
Very wise words.
"The more you know, the more you know you don't know."

Maybe I should have remembered this before making my other remark that
"programming is easy" :)
Any input would be apprehiated, thank you for your
comments thus far as I find them to be encouraging as I work my way
through learning how to go from concept to code and from code to a new
concept.


I'm glad you seem to be enjoying learning how to program. I hope you
find it as rewarding as I have.

--
Marcus Kwok
Nov 22 '05 #34

P: n/a
In article <dl*************@news.t-online.com>,
Sebastian Wiesner <Ba***********@gmx.net> wrote:
Once upon a time (Dienstag, 15. November 2005 22:53) Marcus Kwok wrote
some very nice things
...
In my experience, the CS is the tricky part, but once you have a good
design that takes advantage of intelligent data structures and
algorithms, then programming it is usually pretty straightforward.


I must agree that computer science is a really tricky part, but I have
also had problems when translating a quite useful algorithm into *good*
code.
You will always be able to translate your data model and your algorithms
into almost anything, but translating them into *good* code, is the
actual problem. That part be really tricky.


"Programming is one of the most difficult branches of applied
mathematics; the poorer mathematicians had better remain pure
mathematicians." -- Edsger Dijkstra
--
Greg Comeau / Celebrating 20 years of Comeauity!
Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout
World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90.
Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
Nov 22 '05 #35

P: n/a
Y2J
I had read the various links that you had included and yes I was
refering to the article written by Charles Petzold whether visual
studio rots the mind? I had also read several postings as I had
subscribed to get them emailed to me directly and thought it would be a
great way to start the day out.

One of my concerns is that I had read the what is "on topic" as opposed
to what is "off topic", I had to consider if my trivial remarks and
questions are appropriate to be asked here? I don't want to come across
as being a waster of people's time or taking advantage of their
consideration that they may give to my questions.

By reading the postings that were answered I am getting a better idea
of what is appropriate and what is not. I don't expect people to "do my
work" for me either as it seems ridiculous to ask such a thing and then
think of yourself as a programmer.

I know some of the things I talk of might seem quite "juvenile" to the
people who answer the questions here, but I am starting out in learning
C++ and will read through the most fequently asked questions before I
take up anyones time asking something that is described there already.

I thank you for the input I have recieved thus far, I don't actually
know anyone else who is familar with C++ where I live. So forgive me
for asking small questions about something that is so much more than
small.

Peace, Jaret

Nov 22 '05 #36

P: n/a
Y2J
I had read the various links that you had included and yes I was
refering to the article written by Charles Petzold whether visual
studio rots the mind? I had also read several postings as I had
subscribed to get them emailed to me directly and thought it would be a
great way to start the day out.

One of my concerns is that I had read the what is "on topic" as opposed
to what is "off topic", I had to consider if my trivial remarks and
questions are appropriate to be asked here? I don't want to come across
as being a waster of people's time or taking advantage of their
consideration that they may give to my questions.

By reading the postings that were answered I am getting a better idea
of what is appropriate and what is not. I don't expect people to "do my
work" for me either as it seems ridiculous to ask such a thing and then
think of yourself as a programmer.

I know some of the things I talk of might seem quite "juvenile" to the
people who answer the questions here, but I am starting out in learning
C++ and will read through the most fequently asked questions before I
take up anyones time asking something that is described there already.

I thank you for the input I have recieved thus far, I don't actually
know anyone else who is familar with C++ where I live. So forgive me
for asking small questions about something that is so much more than
small.

Peace, Jaret

Nov 22 '05 #37

This discussion thread is closed

Replies have been disabled for this discussion.