pre-requestie for learning C...

R

Richard Bos

What was "blunted" about Turbo Pascal? I've used Macintosh Pascal
and Turbo Pascal and things closer to ISO Pascal. ISO Pascal is a
tough cookie. The Mac (Lightning?) and Turbo Pascals were much closer to
usable languages.

Yes. That is exactly the problem. Real Pascal is good for teaching. Real
C is useful for actual use. Turbo Pascal is a teaching language which
someone has hacked about with to try and make it actually useful, and
almost but not quite succeeded - and in the process destroyed the things
that made it good for teaching, as well.

Richard
 
L

luser-ex-troll

I find ironic that, even though I know Pascal and C are two different
languages in many ways, a not conforming pascal compiler is considered more
usable, if you think about the usual flame wars with <some compiler> in the
context of the C language... anyway I used Turbo Pascal too.

And the attraction over BASIC (to a 10yo) is that it makes
real .exe files: bona fide programs. I had no way of
knowing whether it conformed to anything and no reason
to care (no manual, no textbook, no internet (1988)).
In some respects I've been stuck in 1988 ever since.

luxor es ata-ara-ala
 
R

Richard

CBFalconer said:
Newsgroups (and Usenet in general) are not for private
communications. All input is public. For private communications
use e-mail (if possible).

Well, more wonderful "insider" hint'n'tips from c.l.c's resident guru.
 
R

Richard

CBFalconer said:
The primary thing is that they did not meet the ISO standard for
Pascal in many ways. Just to mention a couple, they lacked the f^,
put, and get functions. The arithmetic text input functions
insisted on termination with EOLine, rather than a non-numeric
character. Lacking f^ etc. you couldn't pick out what was needed.

Note that I am not objecting to extensions (although I consider
they should be suppressible, in order to show conformation to the
standard). I am objecting to lack of things required by the
standard. Users of Borland never learned to use the language
properly.

Yet more systems were written in Borland than in stuffy ISO Pascal.
 
M

Martin Eisenberg

Richard said:
Real Pascal is good for teaching. Real C is useful for actual use.
Turbo Pascal is a teaching language which someone has hacked about
with to try and make it actually useful, and almost but not quite
succeeded - and in the process destroyed the things that made it
good for teaching, as well.

Like many I was taught programming in school using TP, and I think I
was taught well. What lost features are you referring to?


Martin
 
C

CBFalconer

Lorenzo said:
I find ironic that, even though I know Pascal and C are two
different languages in many ways, a not conforming pascal compiler
is considered more usable, if you think about the usual flame wars
with <some compiler> in the context of the C language... anyway I
used Turbo Pascal too.

I think the reason for that attitude is that the blunted Borland
versions were blunted by inserting C like usage in various places.
For example, in the Pascal world the handling method for
interactive files was very specific (but not part of the
standard). This allowed Pascal terminal input to follow prompt
output, and be written identically to non-interactive input. It is
not necessary in C. But C has to go through funny gyrations to
provide one char look-ahead, which was automatic in Pascal. You
probably don't think the gyrations are funny.
 
C

CBFalconer

Richard said:
Yes. That is exactly the problem. Real Pascal is good for teaching.
Real C is useful for actual use. Turbo Pascal is a teaching
language which someone has hacked about with to try and make it
actually useful, and almost but not quite succeeded - and in the
process destroyed the things that made it good for teaching, as
well.

I disagree. You never seem to have learned to use standard
Pascal. I used it for about a dozen years, largely in interactive
embedded systems. I concede that I do not represent the average
Pascal user of those days. Those days preceded C90, and C was a
highly mistake prone language. I had no such difficulties. I
don't think people today appreciate what an advance function
headers specifying parameters and types were to C.
 
G

Guest

Keith Thompson   said:
(e-mail address removed) writes:
[...]
Thank you for all your replies and support. I have decided to learn C.
I am using "Practical C programming" from O'Reilly press.
I've heard bad things about that book; see, for example,
<http://accu.org/index.php?module=bookreviews&func=search&rid=1225>.
Kernighan & Ritchie's "The C Programming Language", 2nd Edition, is
widely considered to be the best book for learning C.  It's a bit
dense, though.

And so are you.  Which is probably why you recommend it.

Despite Kenny's opinions of Chuck, K&R nevertheless remains
an excellent book. My (limited) experience of beginners is
that the lack of model answers to the excercises was a hurdle.
Though comp.lang.c has a wiki somewhere that gives some model answers.

The way to deal with information dense publications is to read them
slowly and carefully. And to go back and re-read if something is
unclear (or ask on comp.lang.c). With K&R you should do the
excercises.
 
T

Thad Smith

Peter said:
and for learning that language [C] you should know the
following things :-

1. Computer Organization and Architecture

2. Assembly Language [ For good understanding of pointers ]

I've found that the people who claim to know about such things
are often the worst C coders, precisely because they claim to
know such things. [Not all, just an awful lot!]

The programmers I've met whose C skills are poor were usually EEs first,
who learned the innards of electronics and processors, then how to write
assembly to accomplish the desired I/O. I attribute the problems with
programming without learning the skills of programming organization,
modularity, and maintenance. While I had a somewhat similar start, I
was very interested in learning about programming in the large.
Nope. Knowing 6809 and 68000 assembly was the worst handicap
I had coming to terms with pointers in C. It wasn't until I
stopped thinking of C as 'portable assembler', i.e. stopped
looking at disassemblies, that I actually got my learning
curve going in an upwards direction.

My experience was different. Since I knew about the use of machine
addresses pointers seemed natural to me.
C is an abstract high level language. Treat it as such.

To me C is a tool for many uses. Some uses are system-specific because
of direct control of hardware and possibly adaptations to the
limitations of small processors. When I have the luxury to program
without these constraints I program as portably and transparently as
feasible.
 
J

JosephKK

Well basically all OO course should start with data.

This is an important selling point of OO, that we concentrate about
data more than functions, given that in the real world, data is more
stable than functions.

Actually, i think that the metadata is the most important, whether you
are building a database (in either sense), financial/accounting
applications, or real time control systems.
Otherwise, you are right, when I was taught programming we studied
first a data structure then the statements to process it, then the
next data structure, and the next statements, etc. But it was too
long ago, I don't have any book references.

Then again, i was never taught programming though i have successfully
completed plenty of courses. When i started there was paper and
pencil, punching the first few instructions directly into the machine,
then paper tape to load more useful programs.
 
J

JosephKK

On Sun, 8 Mar 2009 03:20:16 -0700 (PDT),
Keith Thompson   said:
(e-mail address removed) writes:
[...]
Thank you for all your replies and support. I have decided to learn C.
I am using "Practical C programming" from O'Reilly press.
I've heard bad things about that book; see, for example,
<http://accu.org/index.php?module=bookreviews&func=search&rid=1225>.
Kernighan & Ritchie's "The C Programming Language", 2nd Edition, is
widely considered to be the best book for learning C.  It's a bit
dense, though.

And so are you.  Which is probably why you recommend it.

Despite Kenny's opinions of Chuck, K&R nevertheless remains
an excellent book. My (limited) experience of beginners is
that the lack of model answers to the excercises was a hurdle.
Though comp.lang.c has a wiki somewhere that gives some model answers.

The way to deal with information dense publications is to read them
slowly and carefully. And to go back and re-read if something is
unclear (or ask on comp.lang.c). With K&R you should do the
excercises.

Heartily agreed about doing the exercises in K&R, at least half the
value is in doing the exercises.

"The Standard C Library" by P.J. Plauger is a good collateral
reference. It has a lot of good clean "C" to study.
 
G

Guest

(e-mail address removed) writes:
[...]
Thank you for all your replies and support. I have decided to learn C.
I am using "Practical C programming" from O'Reilly press.
I've heard bad things about that book; see, for example,
<http://accu.org/index.php?module=bookreviews&func=search&rid=1225>.
Kernighan & Ritchie's "The C Programming Language", 2nd Edition, is
widely considered to be the best book for learning C.  It's a bit
dense, though.
And so are you.  Which is probably why you recommend it.
Despite Kenny's opinions of Chuck, K&R nevertheless remains
an excellent book. My (limited) experience of beginners is
that the lack of model answers to the excercises was a hurdle.
Though comp.lang.c has a wiki somewhere that gives some model answers.
The way to deal with information dense publications is to read them
slowly and carefully. And to go back and re-read if something is
unclear (or ask on comp.lang.c). With K&R you should do the
excercises.

Heartily agreed about doing the exercises in K&R, at least half the
value is in doing the exercises.

"The Standard C Library" by P.J. Plauger is a good collateral
reference. It has a lot of good clean "C" to study.- Hide quoted text -

a great book but I'd argue, a bit much for a beginner
 
1

1Z

C is a general purpose programming language and can be used for any
task. This guy is just talking nonsense.

Can be used isn't the same as best thing to use. Dynamic langauges
will
get a lot of jobs coded faster. There is a hard core left over for
which C
is the best/only choice.
 
A

arnuld

I've heard bad things about that book; see, for example,
<http://accu.org/index.php?module=bookreviews&func=search&rid=1225>.

Kernighan & Ritchie's "The C Programming Language", 2nd Edition, is
widely considered to be the best book for learning C. It's a bit
dense, though.


I learned C form this book (though I rarely understood anything at
first read). Even after 1 year, I picked the book yesterday and found
out it is still teaching me some new things :)
 
A

arnuld

Kernighan and Ritchie's "The C Programming Language" is an excellent
book, but often cited as being for C beginners rather than for
programming beginners.


you are 100% right, I have an experience of it .
 
J

JosephKK

On Mon, 9 Mar 2009 02:52:20 -0700 (PDT),
On 6 Mar, 13:37, (e-mail address removed) (Kenny McCormack) wrote:
(e-mail address removed) writes:
[...]
Thank you for all your replies and support. I have decided to learn C.
I am using "Practical C programming" from O'Reilly press.
I've heard bad things about that book; see, for example,
<http://accu.org/index.php?module=bookreviews&func=search&rid=1225>.
Kernighan & Ritchie's "The C Programming Language", 2nd Edition, is
widely considered to be the best book for learning C.  It's a bit
dense, though.
And so are you.  Which is probably why you recommend it.
Despite Kenny's opinions of Chuck, K&R nevertheless remains
an excellent book. My (limited) experience of beginners is
that the lack of model answers to the excercises was a hurdle.
Though comp.lang.c has a wiki somewhere that gives some model answers.
The way to deal with information dense publications is to read them
slowly and carefully. And to go back and re-read if something is
unclear (or ask on comp.lang.c). With K&R you should do the
excercises.

Heartily agreed about doing the exercises in K&R, at least half the
value is in doing the exercises.

"The Standard C Library" by P.J. Plauger is a good collateral
reference. It has a lot of good clean "C" to study.- Hide quoted text -

a great book but I'd argue, a bit much for a beginner

I see much of your point. OTOH most beginning programmers only see
pedagogic snippets of no particularly quality and almost never get to
see a decent to well written program or module of even modest utility.
Altogether too often they do not get see good code while still in
school. A really effective (early) course would compare both good and
sloppy programs (to do the same thing) side by side so that students
can see the difference.
 
P

Pascal J. Bourguignon

JosephKK said:
I see much of your point. OTOH most beginning programmers only see
pedagogic snippets of no particularly quality and almost never get to
see a decent to well written program or module of even modest utility.
Altogether too often they do not get see good code while still in
school. A really effective (early) course would compare both good and
sloppy programs (to do the same thing) side by side so that students
can see the difference.

There could be a module, after they learned some programming, where
they would have to modify two sizeable applications, one well done and
documented, and another well "evolved".
[6.661 Comparative Software Maintenance] ;-)

Indeed, that would be a good learning experience, and it may even help
the numerous pupils who have difficulties to see the purpose of what
they're taught.
 
P

Phlip

Pascal said:
There could be a module, after they learned some programming, where
they would have to modify two sizeable applications, one well done and
documented, and another well "evolved".
[6.661 Comparative Software Maintenance] ;-)

I would prefer the third option: The module that's well tested. I would pick
that over one that's documented...
 
R

Richard Bos

1Z said:
Can be used isn't the same as best thing to use. Dynamic langauges
will get a lot of jobs coded faster.

Initially, at least. And run fast enough for the web - ho-hum.
There is a hard core left over for which C is the best/only choice.

I don't even use C because it is the best choice for anything. I use C
because it is the best backup choice for nearly everything. For each
program I want to write, there is probably a better language than C, but
for each program it would be a different language. C can do them all,
not _quite_ perfectly, but easily good enough.

Richard
 
J

JosephKK

JosephKK said:
I see much of your point. OTOH most beginning programmers only see
pedagogic snippets of no particularly quality and almost never get to
see a decent to well written program or module of even modest utility.
Altogether too often they do not get see good code while still in
school. A really effective (early) course would compare both good and
sloppy programs (to do the same thing) side by side so that students
can see the difference.

There could be a module, after they learned some programming, where
they would have to modify two sizeable applications, one well done and
documented, and another well "evolved".
[6.661 Comparative Software Maintenance] ;-)

Indeed, that would be a good learning experience, and it may even help
the numerous pupils who have difficulties to see the purpose of what
they're taught.

Yes, that would be antoher good exercise or course. Teach them some
respect for maintainable code it might.
 

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

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top