21st Century C: C Tips from the New School

21st Century C: C Tips from the New School

by Ben Klemens
21st Century C: C Tips from the New School

21st Century C: C Tips from the New School

by Ben Klemens

Paperback(2nd ed.)

$49.99 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE
    Check Availability at Nearby Stores

Related collections and offers


Overview

Throw out your old ideas about C and get to know a programming language that’s substantially outgrown its origins. With this revised edition of 21st Century C, you’ll discover up-to-date techniques missing from other C tutorials, whether you’re new to the language or just getting reacquainted.

C isn’t just the foundation of modern programming languages; it is a modern language, ideal for writing efficient, state-of-the-art applications. Get past idioms that made sense on mainframes and learn the tools you need to work with this evolved and aggressively simple language. No matter what programming language you currently favor, you’ll quickly see that 21st century C rocks.

  • Set up a C programming environment with shell facilities, makefiles, text editors, debuggers, and memory checkers
  • Use Autotools, C’s de facto cross-platform package manager
  • Learn about the problematic C concepts too useful to discard
  • Solve C’s string-building problems with C-standard functions
  • Use modern syntactic features for functions that take structured inputs
  • Build high-level, object-based libraries and programs
  • Perform advanced math, talk to internet servers, and run databases with existing C libraries

This edition also includes new material on concurrent threads, virtual tables, C99 numeric types, and other features.


Product Details

ISBN-13: 9781491903896
Publisher: O'Reilly Media, Incorporated
Publication date: 10/23/2014
Edition description: 2nd ed.
Pages: 406
Product dimensions: 6.90(w) x 9.00(h) x 0.80(d)

About the Author

Ben Klemens has been doing statistical analysis and computationally-intensive modeling of populations ever since getting his PhD in Social Sciences from Caltech. He is of the opinion that writing code should be fun, and has had a grand time writing analyses and models (mostly in C) for the Brookings Institution, the World Bank, National Institute of Mental Health, et al. As a Nonresident Fellow at Brookings and with the Free Software Foundation, he has done work on ensuring that creative authors retain the right to use the software they write. He currently works for the United States Federal
Government.

Table of Contents

Preface;
C Is Punk Rock;
Q & A (Or, the Parameters of the Book);
Standards: So Many to Choose From;
Some Logistics;
Content Updates;
The Environment;
Chapter 1: Set Yourself Up for Easy Compilation;
1.1 Use a Package Manager;
1.2 Compiling C with Windows;
1.3 Which Way to the Library?;
1.4 Using Makefiles;
1.5 Using Libraries from Source;
1.6 Using Libraries from Source (Even if Your Sysadmin Doesn’t Want You To);
1.7 Compiling C Programs via Here Document;
Chapter 2: Debug, Test, Document;
2.1 Using a Debugger;
2.2 Using Valgrind to Check for Errors;
2.3 Unit Testing;
2.4 Interweaving Documentation;
2.5 Error Checking;
Chapter 3: Packaging Your Project;
3.1 The Shell;
3.2 Makefiles vs. Shell Scripts;
3.3 Packaging Your Code with Autotools;
Chapter 4: Version Control;
4.1 Changes via diff;
4.2 Git’s Objects;
4.3 Trees and Their Branches;
4.4 Remote Repositories;
Chapter 5: Playing Nice with Others;
5.1 The Process;
5.2 Python Host;
The Language;
Chapter 6: Your Pal the Pointer;
6.1 Automatic, Static, and Manual Memory;
6.2 Persistent State Variables;
6.3 Pointers Without malloc;
Chapter 7: C Syntax You Can Ignore;
7.1 Don’t Bother Explicitly Returning from main;
7.2 Let Declarations Flow;
7.3 Cast Less;
7.4 Enums and Strings;
7.5 Labels, gotos, switches, and breaks;
7.6 Deprecate Float;
7.7 Comparing Unsigned Integers;
Chapter 8: Obstacles and Opportunity;
8.1 Cultivate Robust and Flourishing Macros;
8.2 Linkage with static and extern;
8.3 The const Keyword;
Chapter 9: Text;
9.1 Making String Handling Less Painful with asprintf;
9.2 A Pæan to strtok;
9.3 Unicode;
Chapter 10: Better Structures;
10.1 Compound Literals;
10.2 Variadic Macros;
10.3 Safely Terminated Lists;
10.4 Foreach;
10.5 Vectorize a Function;
10.6 Designated Initializers;
10.7 Initialize Arrays and Structs with Zeros;
10.8 Typedefs Save the Day;
10.9 Return Multiple Items from a Function;
10.10 Flexible Function Inputs;
10.11 The Void Pointer and the Structures It Points To;
Chapter 11: Object-Oriented Programming in C;
11.1 What You Don’t Get (and Why You Won’t Miss It);
11.2 Extending Structures and Dictionaries;
11.3 Functions in Your Structs;
11.4 Count References;
Chapter 12: Libraries;
12.1 GLib;
12.2 POSIX;
12.3 The GNU Scientific Library;
12.4 SQLite;
12.5 libxml and cURL;
Epilogue;
Glossary;
Bibliography;
Colophon;

From the B&N Reads Blog

Customer Reviews