• Increase font size
  • Default font size
  • Decrease font size

Latest Posts for 'Software'

Can APIs be Copyright?

  Wednesday, August 24th, 2011

As part of the Oracle lawsuit against Google, there is an interesting discussion going on about whether APIs can be copyright. Oracle argues that copyrighting an API is reasonable, claiming that APIs “contain many original and creative elements,” while Google notes that API design “is an art, not a science.” See Mike Masnick’s post on the topic here:


My own point of view is that an API is a specification and does not exhibit any inherent behavior of itself; whereas an implementation that conforms to that specification has behavior and can involve intellectual property in terms of specific algorithms or implementation code. Moreover, an API is inherently public by definition – the point of creating an API is to allow other developers access to your implementation in a standardized way, and as such the API has to be public and open (such as via public header files in C++), versus a specific implementation that can be private and protected (such as the source files used to build a library file in C++).

Table of C++11 Features and Implementation

  Friday, June 17th, 2011

The next iteration of the C++ standard passed the ISO technical committee review earlier this year and is scheduled to be approved this fall. This version of the specification is now referred to as C++11 (a reference to the year it will be approved). Jim Humelsine recently sent me the following link that provides a neat table of the new features of C++11, along with the status of their implementation in the gcc compiler. This resource was put together by George Flanagin and provides a succinct overview of the new features of C++11 as well as a great reference for those interested in trying some of these out in their own code. As I describe in my book, many of these new features allow for better C++ API designs.

List of C++ Libraries

  Monday, December 13th, 2010

I recently came across this list of freely-available C++ libraries. The page hasn’t been updated for a few years, but it’s still a really good list of the different kinds of C++ APIs that are out there for you to use in your own applications.

The list is broken down into several categories, including: Generic, Script Integration, Text Manipulation, Threading, Signalling and Parallel-Programming, Numerical, Algorithmic and Crypto, Network and Web Programming, Multimedia, File Format, GUI, Device Access, Testing and Debugging, Database Engine/Interface, Science, and Financial.

API Diff

  Tuesday, October 26th, 2010

API Diff is a program that I wrote to let you compare two different versions of an API. The aim was to provide a tool that would simplify API reviews and to document everything that changed in a new version of your API.

It uses a C++ parser to provide specific support for C and C++ APIs, but can also handle other languages via a plain-text diff engine. It also lets you view all comment changes so that you can review any new documentation.  You can view changes in a side-by-side visual format and generate a report on everything that changed. The program is available for free for Windows, Mac OS X, and Linux, with additional functionality available for a small license fee. For more details, see:

The Standard Template Library

  Thursday, September 9th, 2010

The Standard Template Library (STL) provides a collection of containers, iterators, algorithms, and functors for C++. This is perhaps the most famous and widely-used C++ API. It provides template-based containers such as std::string, std::vector, std::map, and std::set, which you can specialize with your own types (std::string is of course already specialized for characters). The STL is therefore a good place to look for an example of compile-time polymorphism in C++. The authoritative documentation is the STL programmer’s guide from SGI:

Boost C++ Libraries

  Thursday, September 9th, 2010

The Boost libraries are a collection of open-source libraries that extend the functionality of C++. Many of the Boost founders are active in the C++ standards committee and as a result several of the Boost libraries have been included in the new C++ ISO standard (C++0x), including smart pointers, function object binders, type traits, and tuples. You’d have to go a long way before you find better examples of modern C++ API design.

You can also find a good overview of the Boost libraries on Wikipedia.

Intel’s TBB Library

  Thursday, September 9th, 2010

Intel provides the Threading Building Blocks (TBB) as an open-source library to make it easier to write multithreaded C++ code. This library offers some good examples of C++ API design, including the use of namespaces, templates, containers, iterators, and parallel programming patterns. The TBB library works for Windows, Mac OS X, and Linux.

Lakos’ Analysis Tools

  Wednesday, September 8th, 2010

John Lakos wrote the book Large-Scale C++ Software Design, in which he describes many issues of developing C++ software for large projects. As part of this book, he also provided a number of utilities to manage dependencies in a C++ project. This include:

  • adep: creates aliases to group files into cohesive components
  • cdep: extracts compile-time dependencies from several files
  • ldep: analyzes link-time dependencies among various components

These utilities were originally written in the mid-1990s, though some engineers have attempted to make these utilities work with modern compilers. Here are some links if you’re interested in looking into these:

Alexandrescu’s Loki Library

  Wednesday, September 8th, 2010

Andrei Alexandrescu published an excellent book called “Modern C++ Design.” In this book, he introduced the notion of policy-based templates as a way to provide highly-configurable solutions to various design patterns. He made the source code for these templates available via his Loki library, available at:


An Application Programming Interface (API) provides a logical interface to a piece of software and hides its internal details. This website is dedicated to a book on designing APIs for C++ and includes articles and links on API development.


The book is accompanied by a source code package that contains many of the examples in the text. Download it for free.


Dr. Reddy has also published a computer graphics book called Level of Detail for 3D Graphics. Check it out too!.
Copyright (c) 2024 Martin Reddy. All rights reserved. Login