shameful admission
Anonymous Monk
created: 2004-06-15 12:02:32

You ever see one of those TV shows where the star athlete hangs his head, begins to cry and shockingly admits, "I never learned to read!"

Well here is one from a perl programmer: "I never learned C!"

It's got to be useful to know, but I never got around to learning it. I've done some ASSEMBLER, Java, Basic, and a few languages no one's even heard of, but not a single line of C or C++ code has ever been uttered from my keyboard.

Well now I am getting involved in projects where C is rearing its head, mocking me, shaming me for the times it tried to introduce itself to me whilst I casually turned my back

Should I learn how to program in C? It seems silly, like learning how to drive a Model T, or learning how to use an Abacus.

Re: shameful admission
created: 2004-06-15 12:10:03
C is not the Model T or Abacus of programming languages. It's a useful tool, and the right tool for some jobs. Hammers have been around a long time, and yet they're still an important part of house-building.

Dave

Re: shameful admission
created: 2004-06-15 12:12:12
I'm not sure that learning C/C++ can be equated to a model T or using an abacus. C/C++ can be extremely useful if not necessary for some applications. Although I do virtually no C/C++ programming anymore it's not because the language has become antiquated. If you are faced with building device drivers or need real-time access to hardware, etc. then you may well want to build those apps in C/C++. Certainly if your job depends on C/C++ skills, you'll want to get right on it.

Still, there is an awful lot you can do without C/C++.

Good Luck and Cheers

Sweetblood

Re: shameful admission
created: 2004-06-15 12:25:56

I say "yes" - languages are part of your professional tool box, and the more tools at your disposal, the better developer you can be. Noone is going to argue against the benefits of broader experience and education. You will need this to help you determine which tool is the best fit for a project. People who know only one language will want to apply it to every problem.

I claim that C is the language of choice for much of the open source projects that you will encounter over the next few years, for reasons of portability, speed and familiarity to a large number of developers (but mostly the first two).

If you find yourself building various tools/languages/kernels from source, then knowing C is going to be useful to you at some point. You will at least be more capable of diagnosing and correcting minor issues, providing better feedback to the authors, and ultimately providing patches yourself.

Re: shameful admission
created: 2004-06-15 12:30:46

If you've done enough Perl and/or Java you should be able to pick up C with no problem (and yes, it's worth knowing). I'd reccomend A Book On C (0201183994); the second edition was a pretty good coverage of the language, and the 4th's got good reviews on amazon.

Re: shameful admission
created: 2004-06-15 12:40:24
For a light tutorial on just enough C to get you by, you may wish to read Manning's Extending and Embedding Perl by Tim Jenness and Simon Cozens. It has a quick introduction to C and quite a bit on how to use it to enhance your Perl programs.
Re: shameful admission
created: 2004-06-15 12:53:55
In the old days we used to think there were more lines of COBOL in the universe than any other language...I suspect now, if some poor soul was to make a survey, we would find that C (and C++) have overtaken COBOL.

I think if you need it, you should do it. If you already know how to program in other languages, then you are over the hardest part anyway.

Re^2: shameful admission
created: 2004-06-15 13:10:00
we used to think there were more lines of COBOL in the universe than any other language

Is that because you need almost seven hundred lines of COBOL just to print "hello world"? ;-) See http://www.engin.umd.umich.edu/CIS/course.des/cis400/cobol/hworld.html (well, maybe it's not 700 after all)

Re^3: shameful admission
created: 2004-06-15 13:45:42
lol!

yeah, that was exactly what i was thinking!

--bibo

Re^3: shameful admission
created: 2004-06-15 23:50:43

No, it can be done with much less. The following will torture many a soul.

        0000-MAIN.
            CALL 'printf'
                USING 'Hello, World'
            END-CALL.

            EXIT.
Re: shameful admission
dba
created: 2004-06-15 14:28:53
If you are into some kind of programming or work in IT, be sure to learn atleast the basics of C.
It has been and will be the basis for many operating systems /applications /languages. Be warned, it will not be simple as the current 'clerical' scripting languages.
In these days of 'high productivity' programming languages, still many manufacturing / high availability (stable)applications run in C.
You can find a lot of websites offering tutorials.
Good luck.
Re: shameful admission
created: 2004-06-15 14:43:34
Someone simply must mention the C bible: Kernighan + Ritchie

Amazon Link to K+R

Not exactly a "C for dumbies" book! ;-) Written by the guys who wrote C.

If for no other reason, you can find out where "hello world" comes from (I think).

-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday

Re^2: shameful admission
created: 2004-06-16 04:05:51
I learned C from the original K+R (before ANSI C, prototypes, etc. and before programming/computer books were easily found in a mainstream bookstore...) It worked well for me - concise and to the point.

Michael

Re: shameful admission
created: 2004-06-15 15:58:58
After you learn enough C to do a small project, I also recommend people get familiar with non-imperative languages. All your languages so far simply tell the computer what to do, not what you want solved.

Learn Prolog, APL, Matlab, and others. Just enough for a small project in each.

Every language you learn will reshape how you think of problem-solving, and the things that are common will be reinforced as well.

You'll boggle as you see Perl features in Ada and Forth and FORTRAN.

--
[ e d @ h a l l e y . c c ]

Re: shameful admission
created: 2004-06-15 16:01:40

For better or worse, C is kind of the protoplasm (or maybe the gelatinous goo) of the computing universe, especially the networked/interneted corner. You can probably get by without writing any these days, but obtaining a reading knowledge is necessary if you want to look at any of the internals.

C++ makes it much harder to shoot yourself in the foot, but when you do, it blows off your whole leg.
- Bjarne Stroustrup

Re: shameful admission
created: 2004-06-15 16:43:09
I just started learning c!

i picked up 'the C programming language'
by Kernighan and Ritchie

just go through the chapters one at a time!
Re: shameful admission
created: 2004-06-15 17:01:21
I don't know that you should learn to program proficiently in C, but I have often found myself thankful that I can (more or less easily) *read* C. In my experience, this is a useful skill for almost any programmer--especially since a lot of practical algorithm examples are available in C for just about any purpose. I would say, further, that the shortest route to being able to read C is to acquire at least fundamental skill at *writing* C. Heck, you may like it enough to become proficient...or, even more fearsome--tackle C++! :-)
Re^2: shameful admission
created: 2004-06-16 11:48:31
Very important point to make a difference between reading and writing skills. E.g. if you want to do Computer Linguistics you may get away coding in C, Java or whatever, but you will need reading knowledge of Lisp and Prolog. If you do scientificcomputing its Fortran, if you are going to become a Windows Guru probably Visual Basic, even if you will not do any programming in this languages.
Re: shameful admission
created: 2004-06-15 20:23:28
My 2 Cents:
C, alongside assembly, was the first language I learned and I can definitely recommend becoming familiar with it... if for no other reason than to have a better understanding of a very useful, robust language. I only use C/C++ and assembly to hack around in the Quake 3 and UT2004 engines, but it makes for a fun hobby. Regardless, they make excellent foundations for any programmer.

"If you're ever lost and need directions, ask the guy on the motorcycle."
Re: shameful admission
created: 2004-06-16 08:51:34
Go ahead and learn C. You'll appreciate Perl sooo much more afterwards :)

I'm only half joking there...

___________________
Jeremy
I didn't believe in evil until I dated it.

Re: shameful admission
created: 2004-06-16 11:26:21
C is nice to have "in your bag-o-tricks"; but I've seen alot of Perl programmers say they wish they could forget what they learned in "C". (Mostly to avoid syntax confusion). :-)

I'm not really a human, but I play one on earth. flash japh
Re: shameful admission
created: 2004-06-16 14:21:42

C is a very handy thing to know. There is plenty of C code still out there and the jobs, to me at least, seem easier and easier to find. Many C programmers have migrated to Java and other less intensive languages and now claim ignorance about C. Fewer and fewer schools are turning out new C and C++ programmers. After a long C dryspell, I've been working steadily with C for about six months now, and I don't see it ending.

perlmonks.org content © perlmonks.org and Anonymous Monk, bibo, davido, dba, drfrog, Fletch, freddo411, halley, Hanamaki, heroin_bob, itub, jepri, mpeppler, orderthruchaos, pbeckingham, porkpilot, SirBones, Steve_p, sweetblood, zentara

prlmnks.org © 2006 edmund von der burg (eccles & toad)

v 0.03