|
|
>> Oh, I have a far bigger "problem" than that: C is the number one
>> language requested in job adverts. :-(
>
> So anyone interested in programming jobs might think it's a good idea to
> at least learn the basics...
>
> BTW, at University there were *very* few people who failed to write C++
> programs by the end of the course (and this was an Engineering course
> don't forget). I really find it impossible to believe that you couldn't
> learn the basics of C++ from a book or decent web tutorial.
And when I was at college, we actually did a semester of C. I submitted
a C program, which did actually do what it was intended to do. It took
me an awefully long time to get it to work though. I was constantly
tripped over by various things. You know, the usual:
- printf() exists.
- I keep having to look up the syntax for defining new data structures.
- C doesn't seem to distinguish between Booleans, integers, pointers and
arrays.
- The whole issue of pointer syntax is just confusing.
- Splitting a program into more than one source file opens up a whole
new world of pain. (Especially if you don't have the benefit of automake.)
I guess the basic problem is C's insistence on allowing you to do
absolutely anything, no matter how stupid, and providing no help
whatsoever in finding your mistakes. Couple that with a cryptic syntax
where it's worryingly easy to say something completely different from
what you actually meant and it's not the easiest of languages to use.
Fortunately, for my assignment, I merely had to write a program to "do
graphics". (That was more or less the assignment brief. Do something
that has graphics in it. Open-ended, much?) Fortunately, this doesn't
involve very much sophisticated programming, just lots of algebra. I can
just about handle that.
Still, writing code in C is the easy part. Unfortunately, as soon as you
try to read somebody else's, you quickly realise that regular C
programmers think it's A-OK to do random crazy stuff like using
assignments as expressions or writing while-statements where the
conditional test does all the work and the loop body is empty. (My
particular favourit is performing pointer dereference, assignment, and
incriment in a single statement... Probably very efficient at the
machine level, but utterly opaque to read.)
As for C++... well that might be a little easier. Although the tutorial
I was following explains things in a rather random-seeming order. (You'd
think knowing how to write a class would be a higher priority than
understanding const references, but hey...) It still has the basic
problem of being a language that makes no attempt to stop you doing dumb
things, and overly opaque syntax.
Post a reply to this message
|
|