:: Re: [DNG] Learning C (books)
Inizio della pagina
Delete this message
Reply to this message
Autore: Wm. Moss
Data:  
To: dng
Oggetto: Re: [DNG] Learning C (books)
On 9/28/24 17:04, R A Montante, Ph.D. via Dng wrote:
>>> Hi,
>>> I would recommend:
>>>
>>> The C Programming Language (sometimes termed K&R, after its authors'
>>> initials) is a computer programming book written by Brian Kernighan
>>> and Dennis Ritchie
>> No no no no NO! The preceding book is the ultimate reference, but it's
>> horrible to learn from. I know: I tried for a year to learn from K&R
>> version 1, and couldn't. Then I got something called "The C Puzzle
>> Book", and learned. But these days, with the web, I don't think a book
>> is necessary except for telling you best practices, but initial
>> learning is best done without worrying about best practices.
>>
>> Speaking of best practices, IIRC the K&R code examples are terse and
>> cute but horribly unreadable.
>>
>> SteveT
> Different strokes for different folks. I loved learning C from K&R.
> Every time I hit a problem, a careful reading of the relevant parts
> always explained it. But that was me (and in a very different era),
> and as I am currently teaching C I know that many of my students need
> more structural support in learning I did. I've just starting using
> an online textbook instead of only my own notes, and most of them seem
> to like having something they can refer to when they're on their own.
>
> -- 
> Bob Montante
>      The Tao of math:  The numbers you can count are not the real numbers.

>
>
> _______________________________________________
> Dng mailing list
> Dng@???
> https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


I have been using C since around 1978.

The original manual (which I still have), "A Programmer's Work Bench" is
clear about its intended audience and purpose, it is aimed at system
programming and as a replacement for assembly language, a portable
assembler.

I also have multiple articles from the Bell Labs Journals. All, however
written for an audience with advanced engineering and/or math degrees (a
Bell Labs MTS) and are not particularly useful for general consumption.

I taught C programming at Bell Labs and AT&T and in Universities after
retiring. I have also written a considerable amount of code, mostly for
embedded system and OS core service.

In my opinion, most people who code should not be using a language that
allows for pointer access, pointer arithmetic, and the other low level
access and side effects that are built into the language. That said,
there are to my knowledge no good Algol based languages in common use.
Pascal and its progeny (Modular, Modular-2, Modular-3) never caught on
and the original Iron Man became a horror of complexity as Ada. The
current P-Code languages such as Python and Java are, for me, too slow
and exhibit an annoying syntax. Propriety languages such as PL/I could
have succeeded if their parent companies had released them into the
public domain.

Therefore, I guess C is all that is available for coding ELF
applications. As such, I would strongly recommend reading all one can
find on the Internet. Every C book I have reviewed that is reasonably
understandable leaves out or glosses over some of the truly useful
language constructs. What is most often missing are proper use of a
union rather then casting, the use of an atexit stack and signals for
minimizing crashes, the extensive memory monitoring library and the
ability to start the program prior to main() so the signal masks and
memory monitors can be started prior to the operational code.

I still have the syllabus from the undergraduate class I taught. Its
badly out of date but perhaps I can update it and post it on some public
forum.

-- 
William (Bill) Moss
bill.m.moss@???
NY (USA)
     Those who will not reason, are bigots,
     those who cannot, are fools,
     and those who dare not, are slaves.
Lord Byron


     Justice will not be served until those who are
     unaffected are as outraged as those who are.
Benjamin Franklin


     When the people fear the government there is
     tyranny, when the government fears the people
     there is liberty.
John Basil Barnhill