

Organizing Large C Programs - thmzlt
http://www.cse.shirazu.ac.ir/~azimi/prog88/lectures/15large_programs.pdf

======
mcpherrinm
I'm disappointed that this isn't actually about organizing large C programs. A
more apt title would be "basic introduction to C headers and linking".

How you organize million line projects is an interesting topic. Does anybody
have any actual links?

~~~
psykotic
> How you organize million line projects is an interesting topic. Does anybody
> have any actual links?

Large Scale C++ Software Design by John Lakos is about that topic. Of course,
C++ is its own special hell when it comes to physical coupling because of what
tends to go (and sometimes has to go) in header files.

It's not a terrible book when considering the lack of alternative sources for
the material covered, but a lot of its suggestions are showing their advanced
age and were dubious and controversial even at the time of writing. Nowadays
you have to take into account precompiled headers, unity builds, distributed
build clusters, etc, when considering trade-offs in physical design for large
code bases.

Free startup idea: Incredibuild in the cloud! Tell us how how fast you want
your code base to build and you got it! You'd have to design and implement
finer-grained distributed compiling and linking to overcome Amdahl's Law
speed-up barriers and make it really competitive with something like
Incredibuild for larger companies. But you could bootstrap it with coarser-
grained distribution (distributed compiling at the file granularity but with
non-distributed monolithic linking) a la earlier versions of Incredibuild
while targeting smaller development shops without a lot of spare CPU cycles
floating around the office. Making it dead simple to drop in and use with
existing code bases would be key.

~~~
gte910h
C is not C++. They have different issues, namespaces, abi linkage, libraries,
various other things. They also have different application domains.

~~~
apaprocki
That is true, but the concepts in the Lakos book can be applied to both C and
C++. Splitting units of code based upon physical dependencies and having a
strong naming system are the basic underlying points. (Disclaimer: I work with
John Lakos)

~~~
gte910h
Thank you. The other guy appears to have been thinking I was stating that
flippantly, when really a book that is about C++ file organization has to be
trying to also be about C file organization.

C++ techniques don't apply to C only projects that often.

------
mechanical_fish
I agree that this is kind of mistitled for HN - this is an intro to C - but it
is actually a nice intro to C headers and linking if you have never seen that
before.

