BN.com Gift Guide

21st Century C: C Tips from the New School

Overview

If you know how to program with a general purpose language such as Ruby or Python, you can also learn how to use the C language in a practical and modern style. However, you need many techniques that are entirely absent from every C textbook on the market—except this one. 21st Century C assembles all the tools you need to write efficient, state-of-the-art programs with C.

You’ll get to know the facilities of your shell, makefiles, fabulous text editors, debuggers, and memory ...

See more details below
Other sellers (Paperback)
  • All (2) from $54.88   
  • New (1) from $54.88   
  • Used (1) from $70.94   

Overview

If you know how to program with a general purpose language such as Ruby or Python, you can also learn how to use the C language in a practical and modern style. However, you need many techniques that are entirely absent from every C textbook on the market—except this one. 21st Century C assembles all the tools you need to write efficient, state-of-the-art programs with C.

You’ll get to know the facilities of your shell, makefiles, fabulous text editors, debuggers, and memory checkers as well as tips that exhort you to throw out the tools that primarily made sense on the mainframes of old, such as the switch statement or the dreaded malloc().

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.

Read More Show Less

Product Details

  • ISBN-13: 9781449327149
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 11/2/2012
  • Edition number: 1
  • Pages: 296
  • Sales rank: 732,442
  • Product dimensions: 7.00 (w) x 9.10 (h) x 0.80 (d)

Meet 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.

Read More Show Less

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;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)