I have no programming experience. Would you recommend C?

C

Chris Hills

Malcolm McLean said:
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.

So almost as soon as you have learnt it you need to move on to another
language?

I can see the idea but I think it is fatally flawed. Also it depends
what the OP wants to do. Basic may be the wrong direction.
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.


Not if there are no sub routines.
 
C

Chris Hills

Roland Pibinger said:
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.

It depends what you want to do. I suggest you find out WHY the OP wants
to learn to program.
 
C

Chris Hills

August Karlstrom 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.


Good in theory but as Oberon is hardly used at all. It is a little
pointless. As least there is a lot of readily available support and
tools for C and to a lesser extent Pascal. This is not the case for
Pascal.

Ie if I took a dozen programmers at random all could help with c or know
where tools and help are, probably half could do the same with Pascal.
I doubt that 90% would even have heard of Oberon. (Or Modula 3)
 
C

Chris Hills

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

Yes, C is the BEST first language to start with.

Probably practically a good choice but probably not the "BEST"
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).

Fair enough.
2. It is THE standard in every possible field...

Not so. In some fields Coral, Ad, C++ and other languages are the
standard but I grant you C is the common choice for most.
If there has been a
way to port C to somewhere, its most likely been ported.

Very true. Even to PIC's
3. Many languages base themselves(even if it is just basic syntax) off
of C(ie: C++, Perl, Java, etc...).

Fair enough.
4. It will help you a lot if you want to join in on Linux and GNU
development.

What you mean is as it is widely used you are more likely to come across
projects, Commercial, hobby, open source etc that are based on C than
any other language. (No one said Linux or Gnu was a requirement)
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.

I think you will have a VERY hard time arguing that one. It is a red
herring.

However, if you aren't willing to put in crippling amounts of effort,
than you are wasting your time in C.

That is not true by a long way.
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.
Maybe.

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.

It depends if you are hacking or SW Engineering.
 
C

Chris Hills

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

Well that is a silly statement to make and completely un provable. (It
is also wrong)
 
C

Charlton Wilbur

(discussing Deitel & Deitel's _C: How to Program_, 5th ed.)

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

Bizarre. As I recall, in the earlier edition they had a smattering of
information on things that are likely to be gotchas in C++, but it
wasn't a third of the book. And they *have* a _C++: How to Program_
book. I can only speculate that this is something that their
educational customers want.

Charlton
 
M

Malcolm McLean

Chris Hills said:
So almost as soon as you have learnt it you need to move on to another
language?

I can see the idea but I think it is fatally flawed. Also it depends what
the OP wants to do. Basic may be the wrong direction.
I don't know.
For instance in the bioinformatics course we taught people to program using
Java. The problem was that, for many, object-orientation was a step too far.
For instance I once told a girl to reverse an array, and she just looked at
me blankly. The idea of doing something in a unit hadn't sunk in.

Another important point is that the source code for my Basic is available,
and relatively short and readable. So it helps to demystify the tool.
Not if there are no sub routines.
In conventional Basic subroutines are pretty unusable because there are no
local variables, no way of passing parameters, and the line system means you
cannot cut and paste code between programs.
So most Basic programs
were written without them. The programs were short enough for it not to
matter over much. In the fact the number of times you need to execute the
same code from two places in the same program is limited, with the exception
of highly reusable routines like sine which are provided.

I've got a whole list of useful program written in Basic for BASICdraw
 
M

Malcolm McLean

Chris Hills said:
Well that is a silly statement to make and completely un provable. (It is
also wrong)
The Ivy League universities generally use Lisp as a first programming
language for teaching introductory computer science. American readers will
no doubt give exact details.
 
S

swengineer001

santosh said:
For C, probably the best book for learning it may be "The
C Programming Language" second edition by Kernighan and Ritchie.

I have to disagree with this. I think K&R is a very poor choice for a
beginner, especially one with no programming experience. I think it is
excellent but you need to have some idea what they are talking about
before beginning. I would tend to agree with Richard that Deitel &
Deitel is a good place for a complete beginner to start.
 
R

Roland Pibinger

(discussing Deitel & Deitel's _C: How to Program_, 5th ed.)
RH> Page 666 (!) sees a drastic change, however - from there to
RH> page 1062 they focus entirely on C++.

Bizarre. As I recall, in the earlier edition they had a smattering of
information on things that are likely to be gotchas in C++, but it
wasn't a third of the book. And they *have* a _C++: How to Program_
book. I can only speculate that this is something that their
educational customers want.

You frequently see job ads for 'C/C++ programmers'. Those people are
supposed to be proficient in a programming style that can be
characterized as C with classes. The (to be maintained) program
usually is written in procedural C style enhanced with some C++
constructs, especially classes (sometimes with excessive inheritance
hierarchies), but without 'advanced' C++ features like exception
handling and templates. This programming style was created in the
early nineties and seems to be prevalent to this day. In that sense
the Deitels certainly deliver something that their customers want.

Best regards,
Roland Pibinger
 
F

Flash Gordon

Malcolm McLean wrote, On 21/01/07 17:11:
Since your language does not even include subroutines any book on how to
learn using it would be something I would recommend people avoid.
I don't know.
For instance in the bioinformatics course we taught people to program using
Java. The problem was that, for many, object-orientation was a step too far.

Or then again the OP might be able to learn all that you can do in your
Basic in under a week, in which case it would be a complete waste of
time because the following week the OP would have to switch to a new
language to progress.
For instance I once told a girl to reverse an array, and she just looked at
me blankly. The idea of doing something in a unit hadn't sunk in.

So? That does not mean that the OP is like that.
Another important point is that the source code for my Basic is available,
and relatively short and readable. So it helps to demystify the tool.

I would be surprised if people having difficulty writing programs long
enough to need to be broken down in to subroutines are up to
understanding a BASIC interpreter.
In conventional Basic subroutines are pretty unusable

That's odd because in the first significant program I wrote, which was
in BASIC on a Commodore PET, I made a lot of use of subroutines. Of
course, later (or may be earlier) BASIC implementations added procedures
which improved the language no end.
> because there are no
local variables, no way of passing parameters, and the line system means you
cannot cut and paste code between programs.

The above makes them less useful but by no means makes them unusable.
So most Basic programs
were written without them.

May be most programs you write, but as soon as I was beyond about 10 or
20 line programs all of mine made use of subroutines until I moved on to
languages with better facilities.
> The programs were short enough for it not to
matter over much. In the fact the number of times you need to execute the
same code from two places in the same program is limited, with the exception
of highly reusable routines like sine which are provided.

Abstracting code in to
subroutines/functions/procedures/modules/objects/whatever is not only
about reuse it is also about managing complexity. It is often easier to
understand an N line program when is broken down in to M functions even
if each function is only called once.
I've got a whole list of useful program written in Basic for BASICdraw

Well, since your implementation does even include subroutines the only
thing I would use it for is illustrating what a programming language
should NOT be.
 
C

Chris Hills

Malcolm McLean said:
The Ivy League universities

What is an ivy league university?
generally use Lisp as a first programming
language for teaching introductory computer science. American readers will
no doubt give exact details.

This pre-supposed that US universities are "the best circles" something
most outside the US would argue with.
 
C

Christopher Benson-Manica

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.

Well, I did call them "silly", as I also think using those books is a
bad idea.
Yes, and "C for Dummies" illustrates that perfectly.

The problem with those "X for Dummies" books is that, after reading
them, you're still a dummy :)
 
K

Keith Thompson

Chris Hills said:
What is an ivy league university?
[...]

Any of Brown, Columbia, Cornell, Dartmouth, Harvard, Princeton,
University of Pennsylvania, Yale.
 
W

websnarf

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

Not really. C is a very programmer unfriendly language. Basic, Logo,
Python and even Fortran are much better choices for a first language.
Although Pascal was designed to be a first language, I am personally
not a real fan of it as a first language. "Types" is something you
should learn about *after* you learn about basic algorithms. The only
problem is, if you learn a language like Python first, going to C later
will seem like taking a step backwards.
 
R

Richard Heathfield

(e-mail address removed) said:
Not really. C is a very programmer unfriendly language.

In what way is C unfriendly to programmers? I'm a programmer, and C likes me
a lot. There are quite a few programmers here who would say the same.
 
C

Charlton Wilbur

CBF> Harvard, Yale, Columbia, Princeton.

.... Brown, Dartmouth, Cornell, University of Pennsylvania.

Technically the Ivy League is an athletic conference, but the schools
have enough in common otherwise that "Ivy League" is a meaningful
shorthand.

Charlton
 
C

CBFalconer

Richard said:
(e-mail address removed) said:

In what way is C unfriendly to programmers? I'm a programmer, and
C likes me a lot. There are quite a few programmers here who would
say the same.

This is something like marriage. After a while you learn to put up
with and compensate for the various failings. Or not. You also
try to pick a partner to minimize those strains.

--
<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
 
C

Chris Hills

CBFalconer said:
Harvard, Yale, Columbia, Princeton.

Thanks... This is the problem with people using little understood local
idioms in an international NG.

I thought Harvard was a business school.

BTW in the best circles they don't use Lisp as a first 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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top