Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Software design practice in C [closed]

Tags:

c

For OOP languages, there are many books describing how to design software, and design patterns are mainly for OOP languages.

I am wondering whether there are any books/good articles teaching how to use C in a big project, like it is a good practice to use static functions when this function is only used in a single file.

like image 576
Yin Zhu Avatar asked Jan 04 '10 14:01

Yin Zhu


People also ask

Can I build software with C?

We inferred that C is used in all spheres of hardware and software development, making it useful for upcoming software developers and software professionals, of course, who have great command over C to design complex interfaces.

Are there any design patterns in C?

Yes, there are. Lazy initialization, singleton, object pool, object state etc. are easily implemented in pure C.

What is designing in C?

All functions in C always use the same basic pattern (syntax). This syntax can be captured in a "Design Pattern". Your job is to memorize this pattern for future use (and tests).


2 Answers

G'day,

While heavily focused on C++, John Lakos's excellent book "Large-Scale C++ Software Design" has a lot of information that is very relevant to the design of software written in C.

Edit: Oooh. After seeing @Jackson's suggestion for the excellent "The Practice of Programming" I'd also highly recommend Eric Raymond's excellent book "The Art of UNIX Programming.". Thanks for the reminder @Jackson.

HTH

cheers,

like image 119
Rob Wells Avatar answered Sep 21 '22 16:09

Rob Wells


If you want a more C specific book then you could look at The Practice of Programming by Kernighan and Pike.

NB: I've always thought of OOP as a way of looking at design; the fact that some languages provide explicit support for it is nice but not esssential.

like image 36
Jackson Avatar answered Sep 20 '22 16:09

Jackson