I have no programming experience. Would you recommend C?

E

Enteng

Hi I'm thinking about learning C as my first programming language.
Would you recommend it?
Also how do you suggest that I learn it?What books/tutorials should I
read for someone like me?

Thanks in advance!

-entengk
 
D

Daniel

Enteng said:
Hi I'm thinking about learning C as my first programming language.
Would you recommend it? Yes.
Also how do you suggest that I learn it?
Reading some books and writting as many as possible codes.
What books/tutorials should I read for someone like me?
The C Programming Language (the second edition)
 
M

Malcolm McLean

Enteng said:
Hi I'm thinking about learning C as my first programming language.
Would you recommend it?
Also how do you suggest that I learn it?What books/tutorials should I
read for someone like me?
I'm planning to write a little booklet "Learn to program with BASICdraw" for
people like you.
Basic doesn't have any pointers and in my version doesn't have any
subroutines. So it is a good way of learning the concept of expressions,
assignments and flow control without all the confusing things.
BASICdraw is also a graphical program, so it has the considerable advantage
that it is possible to write useful and visually appealing programs from day
one.

However I haven't written the booklet yet. C isn't a terrible choice of
first programming language. The main problems are pointers and 2d arrays,
both of which cause great confusion to beginners.

BASICdraw + interpreter documentation available here:
www.personal.leeds.ac.uk/~bgy1mm
 
R

Roland Pibinger

Hi I'm thinking about learning C as my first programming language.
Would you recommend it?

No. C has many quirks and pitfalls that make the learning
unnecessarily difficult. Basic, Python, JavaScript seem to be more
appropriate as entry into programming.
Also how do you suggest that I learn it?What books/tutorials should I
read for someone like me?

Attend a course. Learn the first steps of programming from a human who
shows you the basics and helps you with your mistakes.

Good luck,
Roland Pibinger
 
R

Richard Heathfield

Enteng said:
Hi I'm thinking about learning C as my first programming language.
Would you recommend it?

Yes, absolutely. Pascal is possibly a better starting choice (because it was
actually designed as a teaching language, and was designed well), but C is
a fine choice too.
Also how do you suggest that I learn it?

Since you appear to have no prior experience of programming, I would suggest
you start with "C How to Program", 5th edition, by Deitel and Deitel. It
develops an identity crisis in the second half and forgets which language
it's supposed to be discussing, but the first half is excellent.

Get yourself a free compiler. If you're on Linux, you're sorted - gcc should
already be installed. If you're on Win32, there's a list of free C
compilers at http://www.cpax.org.uk/prg/portable/c/resources.php
What books/tutorials should I read for someone like me?

See that same URL for a list of recommendations. There are precisely two
good C tutorials on the Web, and they are both listed there. So, too, is a
list of decent C books. I don't claim it's an exhaustive list, but you need
to know that most books on C are pretty dire.
 
S

santosh

Enteng said:
Hi I'm thinking about learning C as my first programming language.
Would you recommend it?
Also how do you suggest that I learn it?What books/tutorials should I
read for someone like me?

It really depends on your flair. If you want to learn a powerful and
expressive yet simple language, which is also very popular, then C, (or
possibly C++), may be your choice.

If you want to go with a simpler language, perhaps more suited for
learning purposes, with lesser flexibility, perhaps you should consider
Pascal, Python, Haskell etc.

It's more important to stick with a choice, (once made), and get lots
of practise. For C, probably the best book for learning it may be "The
C Programming Language" second edition by Kernighan and Ritchie. This
group and it's FAQ are great resources too.

<http://c-faq.com/> /*
FAQ for this group */
<http://www.cs.cf.ac.uk/Dave/C/>
<www.eskimo.com/~scs/cclass/cclass.html>
<www.lysator.liu.se/c/>
<www.le.ac.uk/cc/tutorials/c/>
<www.open-std.org/jtc1/sc22/wg14/> /* ISO C
standardisation group */
<www.dinkumware.com/manuals/> /* C standard
library reference */
<http://gcc.gnu.org/> /*
excellent free compiler collection */
<www.bloodshed.net/> /*
good IDE */
<www.mingw.org/> /*
gcc for windows */
<www.acm.org/crossroads/xrds10-4/firstlang.html> /* about first
choice of language */
 
A

August Karlstrom

Richard Heathfield skrev:
Enteng said:


Yes, absolutely. Pascal is possibly a better starting choice (because it was
actually designed as a teaching language, and was designed well),

Oberon is an even better design and it is smaller and easier to learn
too. Oberon, as opposed to Pascal, also has support for modules and
object oriented programming.


August
 
M

Malcolm McLean

santosh said:
It really depends on your flair. If you want to learn a powerful and
expressive yet simple language, which is also very popular, then C, (or
possibly C++), may be your choice.

If you want to go with a simpler language, perhaps more suited for
learning purposes, with lesser flexibility, perhaps you should consider
Pascal, Python, Haskell etc.

It's more important to stick with a choice, (once made), and get lots
of practise. For C, probably the best book for learning it may be "The
C Programming Language" second edition by Kernighan and Ritchie. This
group and it's FAQ are great resources too.
In the best circles, Lisp is the the language of choice for introductory
programming.
 
B

Bob Martin

in 715545 20070120 122146 "Malcolm McLean said:
In the best circles, Lisp is the the language of choice for introductory
programming.

but that approach goes nowhere
 
P

pocmatos

Enteng escreveu:
Hi I'm thinking about learning C as my first programming language.
Would you recommend it?
Also how do you suggest that I learn it?What books/tutorials should I
read for someone like me?

Hello,

If you're in a hurry to program in C, well, then you should just get a
C book like "The C Programming Language" by K&R and slowly try to
understand examples and everything they say. If you're not in a hurry,
try the first chapters of Structure and Interpretation of Computer
Programs by Sussman et al. (http://mitpress.mit.edu/sicp/). You'll be
introduced to the main concepts in Programming using Scheme (try PLT
Scheme for the examples www.plt-scheme.org) and then come back to C
with "The C Programming Language". It'll be easier to catch up and
you'll have a whole bunch of knowledge which you wouldn't find in K&R
book!

Good luck,

Paulo Matos
 
C

CBFalconer

August said:
Richard Heathfield skrev:

Oberon is an even better design and it is smaller and easier to learn
too. Oberon, as opposed to Pascal, also has support for modules and
object oriented programming.

No, that just confuses the issue with complications for a newbie.
ISO Pascal is much better for learning. There is also PascalS
which is even further simplified for students. No reals, no files
other than input/output, etc. Thorough run-time checks.

--
<http://www.cs.auckland.ac.nz/~pgut001/pubs/vista_cost.txt>

"A man who is right every time is not likely to do very much."
-- Francis Crick, co-discover of DNA
"There is nothing more amazing than stupidity in action."
-- Thomas Matthews
 
B

Barry

CBFalconer said:
No, that just confuses the issue with complications for a newbie.
ISO Pascal is much better for learning. There is also PascalS
which is even further simplified for students. No reals, no files
other than input/output, etc. Thorough run-time checks.
I agree a Pascal like language is the easiest to teach and learn most of
the concepts of programming.
 
B

brandon.m.skinner

It all comes down to how much effort you are willing to put in.

Yes, C is the BEST first language to start with. There are several
reasons for this:
1. It gives a solid base and logic for learning other procedural
languages, as well as languages of other paradigms(Such as C++ and
Haskell).
2. It is THE standard in every possible field... If there has been a
way to port C to somewhere, its most likely been ported.
3. Many languages base themselves(even if it is just basic syntax) off
of C(ie: C++, Perl, Java, etc...).
4. It will help you a lot if you want to join in on Linux and GNU
development.
5. C will change the way you think in a positive way. It gives you
that base logic that is crucial, shows you the way.

However, if you aren't willing to put in crippling amounts of effort,
than you are wasting your time in C. Albeit, once you begin
programming, you will have so much fun, the rest of the learning is
more like heaven than the hell of getting your mind around it enough to
program.

Also, you may not have the type of mind for C. C is very minimalistic
and logical(kind of like Assembly), meaning that it can be cryptic to
those who are learning and don't know C. Which causes problems, that
are easily solved by programming.
 
C

Charlton Wilbur

RH> Since you appear to have no prior experience of programming, I
RH> would suggest you start with "C How to Program", 5th edition,
RH> by Deitel and Deitel. It develops an identity crisis in the
RH> second half and forgets which language it's supposed to be
RH> discussing, but the first half is excellent.

Can you elaborate? The last edition I saw, if memory serves, was the
second, and that one seemed quite good throughout.

Charlton
 
K

Keith Thompson

Richard Heathfield said:
Enteng said:


Yes, absolutely. Pascal is possibly a better starting choice (because it was
actually designed as a teaching language, and was designed well), but C is
a fine choice too.
[...]

If you choose C as your first language, be prepared for the fact that
it won't necessarily detect your errors for you. The C language, and
C implementations, tend to assume that you know what you're doing. If
you write a program tries to drive over a cliff, don't expect any
guardrails to prevent you from doing so, or airbags to cushion your
landing. C gives you the parts and tools to build your own
guardrails, but it doesn't require you to do so, and it doesn't
guarantee that your self-built guardrails will actually do their job.

A simple example:

char s[5];
strcpy(s, "Hello, world");

The first line declares an array of 5 characters. The second attempts
to copy the string "Hello, world" into that array. In some languages,
the equivalent of this code will fail cleanly, perhaps by printing an
error message and terminating your program. In C, however, it's very
likely to go ahead and copy the entire string to the location you
specified, clobbering adjacent memory with unpredictable results. The
technical term for this is "undefined behavior".

There are add-on tools to address this kind of thing.

Remember that it's not particularly difficult to write incorrect code
in *any* language. But C, by itself, expends less effort than some
other languages to catch your errors for you.

But if you can learn to write reasonably robust programs in C, your
experience should carry over to other languages.
 
R

Richard Heathfield

Charlton Wilbur said:
RH> Since you appear to have no prior experience of programming, I
RH> would suggest you start with "C How to Program", 5th edition,
RH> by Deitel and Deitel. It develops an identity crisis in the
RH> second half and forgets which language it's supposed to be
RH> discussing, but the first half is excellent.

Can you elaborate? The last edition I saw, if memory serves, was the
second, and that one seemed quite good throughout.

Pages 1 to 665 of "C How to Program" make an excellent introduction to C,
and near the end of that part they even introduce you to the delights of
cross-platform games programming using Allegro. Nice, practical hands-on
stuff, albeit probably unlikely to fly on a mainframe.

Page 666 (!) sees a drastic change, however - from there to page 1062 they
focus entirely on C++. (So "second half" was a slight exaggeration - it's a
little over a third of the book.)
 
C

Christopher Benson-Manica

Malcolm McLean said:
In the best circles, Lisp is the the language of choice for introductory
programming.

By "best circles" do you mean "best teaching circles"? The
introductory CS class at Georgia Tech, where I worked as a teaching
assistant for four semesters, was taught in the Scheme dialect of
Lisp, with mixed results. I felt that the very basics came easily to
most students, but later lessons (including unnecessary diversions
into the arcana of real Lisp) were hard to grasp for many students.
Final exam grading was not for the soft-hearted.
 
C

Christopher Benson-Manica

If you're in a hurry to program in C, well, then you should just get a
C book like "The C Programming Language" by K&R and slowly try to
understand examples and everything they say.

If OP is in a real hurry, one of those silly "C for Dummies" or some
such books would be best, but then again, learning C in a hurry is a
bad plan and a waste of time.

(K&R has been printed in a superior second edition.)
 
R

Richard Heathfield

Christopher Benson-Manica said:
If OP is in a real hurry, one of those silly "C for Dummies" or some
such books would be best,

No, it wouldn't. If the OP is in a real hurry, the best thing - as pocmatos
suggested - would be for him to slow down.
but then again, learning C in a hurry is a bad plan and a waste of time.

Yes, and "C for Dummies" illustrates that perfectly.

<snip>
 
M

Malcolm McLean

Christopher Benson-Manica said:
By "best circles" do you mean "best teaching circles"? The
introductory CS class at Georgia Tech, where I worked as a teaching
assistant for four semesters, was taught in the Scheme dialect of
Lisp, with mixed results.
Georgia Tech is obviously the best circles.
I felt that the very basics came easily to
most students, but later lessons (including unnecessary diversions
into the arcana of real Lisp) were hard to grasp for many students.
Final exam grading was not for the soft-hearted.
The problem with real Lisp is that they have kludged, or, in their terms,
vulgarised the language to allow for arrays and other concessions to
efficiency. Then they have changed the names and added shortcuts for all the
basic functions. As a result it a lot harder to understand the logic of the
language.
 

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,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top