Category: C

No Bugs!: Delivering Error-Free Code in C and C++

Sponsor Advertisement

  • Author: David Thielen
  • Format: PDF
  • Price: free

Most developers know that software is inherently buggy.  And most developers also, hopefully, want to eliminate these bugs before shipping a product.  This book is written for these people.

However, writing code with no major bugs (sorry, we haven’t yet reached the point of truly bug-free code yet), is a team effort.  It takes the work of more than just the developers.  It takes testers,  managers, support personnel, and many more.  And this book is aimed at these people too.

This book is designed to solve a problem – buggy code.  Because it is aimed at the problem instead of a specific audience (ie, just developers or just testers), parts of this book may not be interesting to certain audiences.  Chapters 3 – 10 are written mainly for developers.  Chapters 11 & 12 are written mainly for testers.

Yet the book is written to be read straight through.  If you want to develop minimally buggy code, then you have to understand all of the pieces that go into getting there.  Developers need to understand the test process.  Testers need to understand what the developers will be testing on their own. Most importantly, the managers and others responsible  for insuring that the whole organization works need to understand the process.  And as important, they need to insure that the process is actually being followed.

Finally, this book is written from the Windows/DOS/PC perspective.  While most of the ideas discussed are generic to any computing platform, many of the implementations are specific to the PC.  And some of the code is specific not only to the PC, but to specific compilers (stack checking has a tendency to be that way).

If you program on a platform other than the PC, in a language other than c, you will still find this book valuable but you will also find that it leaves a lot more work for you to incorporate the ideas here.

While this is an older book, written in the Win95 era, the first 2 chapters are still very relevant to the programmers of today.

Chapters include:

  • Introduction
  • What is a bug?
  • General Principles
  • Some Basic Tricks
  • Assert the World
  • Debug Printfs
  • Watching the Stack
  • Watching the Heap
  • File I/O
  • Special Tricks for c++
  • Special Tricks for assembly language
  • The Testing Process
  • Shipping the Product
  • Useful bug-discovery tools
  • Debug Message Boxes
  • Debug Second Monitor

Get the Book: No Bugs!
Get the additional disk content

The C Book

Sponsor Advertisement

My image
  • Author: Mike Banahan, Declan Brady and Mark Doran
  • Format: PDF, online HTML
  • Price: free

This is not a tutorial introduction to programming. The book is designed for programmers who already have some experience of using a modern high-level procedural programming language. As we explain later, C isn’t really appropriate for complete beginners, though many have managed to use it, so the book will assume that its readers have already done battle with the notions of statements, variables, conditional execution, arrays, procedures (or subroutines) and so on. Instead of wasting your time by ploughing through tedious descriptions of how to add two numbers together and explaining that the symbol for multiplication is *, the book concentrates on the things that are special to C. In particular, it’s the way that C is used which is emphasized.

Chapters Include:

  • An Introduction to C
  • Variables and Arithmetic
  • Control of Flow and Logical Expressions
  • Functions
  • Arrays and Pointers
  • Structured Data Types
  • The Preprocessor
  • Specialized Areas of C
  • Libraries
  • Complete Programs in C
  • Answers to Exercises

http://publications.gbdirect.co.uk/c_book/

Arduino Programming Notebook

Sponsor Advertisement

My image
  • Author: Brian Evans
  • Format: downloadable PDF
  • Price: free

A beginner’s reference to the programming syntax of the Arduino microcontroller. Includes information on program structure, variables, datatypes, arithmetic, constants, flow control, and most of the common functions of the core library. Also includes an appendix with schematics and simple programs for several common tasks.

Chapters include:

  • structure
  • variables
  • datatypes
  • arithmetic
  • constants
  • flow control
  • digital i/o
  • analog i/o
  • time
  • math
  • random
  • serial

Get the book: Arduino Programming Notebook

Object Orientated Programming in ANSI-C

Sponsor Advertisement

  • Author: Axel Schreiner
  • Format: PDF
  • Price: free

Object-oriented programming is the current cure-all – although it has been around for much more then ten years. At the core, there is little more to it then finally applying the good programming principles which we have been taught for more then twenty years. C++ (Eiffel, Oberon-2, Smalltalk … take your pick) is the New Language because it is object-oriented – although you need not use it that way if you do not want to (or know how to), and it turns out that you can do just as well with plain ANSI-C. Only object-orientation permits code reuse between projects, although the idea of subroutines is as old as computers and good programmers always carried their toolkits and libraries with them.

This book is not going to praise object-oriented programming or condemn the Old Way. We are simply going to use ANSI-C to discover how object-oriented programming is done, what its techniques are, why they help us solve bigger problems, and how we harness generality and program to catch mistakes earlier. Along the way we encounter all the jargon – classes, inheritance, instances, linkage, methods, objects, polymorphisms, and more – but we take it out of the realm of magic and see how it translates into the things we have known and done all along.

Chapters include:

  • Abstract Data Types — Information Hiding
  • Dynamic Linkage — Generic Functions
  • Programming Savvy — Arithmetic Expressions
  • Inheritance — Code Reuse and Refinement
  • Programming Savvy — Symbol Table
  • Class Hierarchy — Maintainability
  • The ooc Preprocessor — Enforcing a Coding Standard
  • Dynamic Type Checking — Defensive Programming
  • Static Construction— Self-Organization
  • Delegates — Callback Functions
  • Class Methods— Plugging Memory Leaks
  • Persistent Objects — Storing and Loading Data Structures
  • Exceptions — Disciplined Error Recovery
  • Forwarding Messages — A GUI Calculator

http://www.planetpdf.com/developer/article.asp?contentid=6635

Free Course: Computer Programming I (using C)

Sponsor Advertisement


University of Washington CSE 142 – Computer Programming I

This is a complete basic introductory course (using C) for beginners that have no previous programming experience, that was offered at the University of Washington during the fall of 2000 (taught by Martin Dickey).

If you have never studied programming, this course was designed for you.

Access to slides, lecture videos, homework assignments & solutions, exams & solutions.

Continue reading

.NET Book Zero

Sponsor Advertisement

My image
  • Author: Charles Petzold
  • Format: PDF and XPS, with downloadable source code
  • Price: free

This book is an introduction to C# and the Microsoft .NET Framework for programmers who have experience with C or C++.

Chapters include:

  • Why This Book?
  • Why .NET?
  • Runtimes and SDKs
  • Edit, Compile, Run, Disassemble
  • Strings and the Console
  • Primitive Data Types
  • Operators and Expressions
  • Selection and Iteration
  • The Stack and the Heap
  • Arrays
  • Methods and Fields
  • Exception Handling
  • Classes, Structures, and Objects
  • Instance Methods
  • Constructors
  • Concepts of Equality
  • Fields and Properties
  • Inheritance
  • Virtuality
  • Operator Overloading
  • Interfaces
  • Interoperability
  • Dates and Times
  • Events and Delegates
  • Files and Streams
  • String Theory
  • Generics
  • Nullable Types

http://www.charlespetzold.com/dotnet/