
Elegant C Language Coding Patterns
Description
Book Introduction
Expert advice on C programming is really hard to find.
There are a ton of tutorials on object-oriented programming languages, but very little on the older C language.
"Elegant C Coding Patterns" provides guidelines that can be used as a reference when making design decisions for large-scale programs.
You'll learn how to apply these guidelines step-by-step through examples, giving you a feel for how they can be applied in practice.
In this book, the author answers questions about how to structure C programs, deal with errors, and design flexible interfaces.
Whether you're looking for a specific pattern or an overview to guide design decisions on a specific topic, this book will guide you.
In Part 1, you will learn how to implement practical design knowledge specific to the C programming language.
Part 2 presents examples of implementing larger programs by applying C programming patterns.
You will learn how patterns make developers' jobs easier from the perspective of good design decisions.
There are a ton of tutorials on object-oriented programming languages, but very little on the older C language.
"Elegant C Coding Patterns" provides guidelines that can be used as a reference when making design decisions for large-scale programs.
You'll learn how to apply these guidelines step-by-step through examples, giving you a feel for how they can be applied in practice.
In this book, the author answers questions about how to structure C programs, deal with errors, and design flexible interfaces.
Whether you're looking for a specific pattern or an overview to guide design decisions on a specific topic, this book will guide you.
In Part 1, you will learn how to implement practical design knowledge specific to the C programming language.
Part 2 presents examples of implementing larger programs by applying C programming patterns.
You will learn how patterns make developers' jobs easier from the perspective of good design decisions.
- You can preview some of the book's contents.
Preview
index
Part 1 C Pattern
Chapter 1 Error Handling
Running example
Function separation
Protection phrase
The principles of a warrior
Goto error handling
Cleanup Records
Object-based error handling
summation
Further Reading
Next is...
Chapter 2 Returning Error Information
Running example
Return status code
Return associated errors
Special return values
Error log
summation
Further Reading
Next is...
Chapter 3 Memory Management
Data storage and issues in dynamic memory
Running example
Stack first
Permanent memory
Cleanup delay
Designated ownership
Allocation wrapper
Pointer check
memory pool
summation
Further Reading
Next is...
Chapter 4 Returning Data from C Functions
Running example
Return value
Out parameter
Bundle Instance
Immutable instances
Caller-owned buffer
Callee assignment
summation
Next is...
Chapter 5 Data Life and Ownership
Stateless software modules
Global state software module
Caller-owned instance
shared instances
summation
Further Reading
Next is...
Chapter 6 Flexible API
header file
handle
dynamic interface
Function control
summation
Further Reading
Next is...
Chapter 7 Iterator Interface
Running example
Index access
Cursor iterator
Callback iterator
summation
Further Reading
Next is...
Chapter 8 File Organization in Modular Programming
Running example
Include protection
Software Module Directory
Global Include Directory
Own components
API replication
summation
Next is...
Chapter 9: Escaping #ifdef Hell
Running example
Evasion of deformation
Primitive separation
Atomic primitives
abstraction layer
Separation of variant implementation
summation
Further Reading
Next is...
Part 2 Pattern Story
Chapter 10: Implementing Logging Functions
Pattern Story
File structure
Central logging function
Logging Source Filter
Conditional logging
Diversification of logging output targets
File logging
Cross-platform files
Using Logger
summation
Chapter 11: Building a User Management System
Pattern Story
Data organization
File structure
Authentication: Error Handling
Authentication: Error Logging
Adding a User: Error Handling
repeat
Use a user management system
summation
Chapter 12 Conclusion
What you learned
Further Reading
Conclusion
Chapter 1 Error Handling
Running example
Function separation
Protection phrase
The principles of a warrior
Goto error handling
Cleanup Records
Object-based error handling
summation
Further Reading
Next is...
Chapter 2 Returning Error Information
Running example
Return status code
Return associated errors
Special return values
Error log
summation
Further Reading
Next is...
Chapter 3 Memory Management
Data storage and issues in dynamic memory
Running example
Stack first
Permanent memory
Cleanup delay
Designated ownership
Allocation wrapper
Pointer check
memory pool
summation
Further Reading
Next is...
Chapter 4 Returning Data from C Functions
Running example
Return value
Out parameter
Bundle Instance
Immutable instances
Caller-owned buffer
Callee assignment
summation
Next is...
Chapter 5 Data Life and Ownership
Stateless software modules
Global state software module
Caller-owned instance
shared instances
summation
Further Reading
Next is...
Chapter 6 Flexible API
header file
handle
dynamic interface
Function control
summation
Further Reading
Next is...
Chapter 7 Iterator Interface
Running example
Index access
Cursor iterator
Callback iterator
summation
Further Reading
Next is...
Chapter 8 File Organization in Modular Programming
Running example
Include protection
Software Module Directory
Global Include Directory
Own components
API replication
summation
Next is...
Chapter 9: Escaping #ifdef Hell
Running example
Evasion of deformation
Primitive separation
Atomic primitives
abstraction layer
Separation of variant implementation
summation
Further Reading
Next is...
Part 2 Pattern Story
Chapter 10: Implementing Logging Functions
Pattern Story
File structure
Central logging function
Logging Source Filter
Conditional logging
Diversification of logging output targets
File logging
Cross-platform files
Using Logger
summation
Chapter 11: Building a User Management System
Pattern Story
Data organization
File structure
Authentication: Error Handling
Authentication: Error Logging
Adding a User: Error Handling
repeat
Use a user management system
summation
Chapter 12 Conclusion
What you learned
Further Reading
Conclusion
Publisher's Review
[What this book covers]
Error handling
ㆍ Return error information
ㆍ Memory management
ㆍ Returning data from C functions
ㆍ Data lifespan and ownership
ㆍ Flexible API
ㆍ Iterator interface
ㆍ File organization in modular programs
ㆍ #ifdef escape from hell
Error handling
ㆍ Return error information
ㆍ Memory management
ㆍ Returning data from C functions
ㆍ Data lifespan and ownership
ㆍ Flexible API
ㆍ Iterator interface
ㆍ File organization in modular programs
ㆍ #ifdef escape from hell
GOODS SPECIFICS
- Date of issue: April 2, 2025
- Page count, weight, size: 364 pages | 172*225*30mm
- ISBN13: 9788966264704
- ISBN10: 8966264700
You may also like
카테고리
korean
korean