C for linux ??

A

Arne Vajhøj

What's there to talk about?

Anybody claiming a good working knowledge of Linux is probably already a
decent C programmer

Not necessarily today.

And even decent programmers may have a few questions.
and almost anything Linux-specific you'd need to know
is covered in remarkably few books:

- "UNIX Systems Programming for SVR4" (the O'reilly "Lion" book) is still
directly applicable to modern Linuxes.

- section 2 of the man pages (of course)

- "Lex & Yacc" (O'Reilly) - equally good for Flex and Bison

- "Pthreads Programming" (O'Reilly)


and, more generally

- "The Practice of Programming" - Kernighan & Pike

- "Algorithms" - Sedgewick

The latter two are useful no matter what language you're writing in.
Kernighan & Pike is excellent for advice on writing well-structured
programs that are easy to maintain and debug - and there's even a bit of
Java in it.

"Algorithms" is written in Pascal, but its good, clear well-explained
code and very easy to transcribe into other languages. It was recommended
to me by one of the best programmers I know and I've certainly found it
useful. It may not be a comprehensive as Knuth, but it occupies a lot
less shelf space and is rather cheaper, and I've found it more generally
useful than Wirth's "Algorithms + Data Structures = Programs".

I assume that every C programmer has a copy of Kernighan & Richie's "The
C programming language".

Looks like good books.

But there are also other good books.

Stevens' book on Unix programming.

For C++ "Accelerated c++" and the two "Effective C++" books.

Arne
 
S

SL@maxis

What's there to talk about?
...
...
I assume that every C programmer has a copy of Kernighan & Richie's "The
C programming language".

Thanks. I wonder I have the time to "gather so much" like you.
 
A

Arne Vajhøj

I don't write C++. I have a copy of Stroustoup but found it much harder
to read than K&R.

C++ is a lot more complex than C.

No surprise that a C++ book is harder to read than a C book.
I tried to get into C++ but (a) didn't like it a lot and

Not everyone does.
(b) found *huge*
binary bloat and rubbish performance.

C++ programs tend to pull in a few MB of code. About 1 cent
wort of RAM today.

:)

C++ compilers today should optimize fine in general. But obviously
no guarantees.
Besides, almost every time I've
needed to read a C++ program I've discovered it to be essentially ANSI C
with // comments and not an object in sight.

// comments and declarations in the middle of the code.

I have seen that too.

Note that both are actually part of C99.

:)

Arne
 
S

SL@maxis

I've been writing C for something like 25 years (and COBOL for the 15
before that) and tend to collect books. That short list is the stuff I've
settled on as the essentials for writing C in a *NIX environment.

...
- for Windows, you'll probably end up with half a shelf of stuff which is
likely to be incomplete, thanks to MS's fondness for undocumented
features. Been there, done that, still got the pile of moldering books.

When I say "gather so much" I mean there is so much "stuff" in your head.
;-)
 
A

Arne Vajhøj

- for Windows, you'll probably end up with half a shelf of stuff which is
likely to be incomplete, thanks to MS's fondness for undocumented
features. Been there, done that, still got the pile of moldering books.

There may be some undocumented stuff, but MS produces a lot
of documentation.

In 2008 installing the entire MSDN Library took 2.5 GB.

And it likely several times bigger today in 2012 (but you can
not download all of it - most of it is web access only).

Arne
 

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,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top