Patterns for Kids: The Ant and the Grasshopper

Industriousness is difficult to describe and harder still to sell. At first blush, it might seem like it'd be easy to sell the simplest way to ensure happiness, wealth, and general success, but long-term thinking is not natural for a great many people. This is why Aesop fables are so significant - they can

Patterns for Kids: Clever Elsa

Most of us have at least heard of the Grimm Fairy Tales. The Brothers Grimm travelled through Germany compiling folk tales, which they published into an excellent collection of myths (pattern-conveying stories) that convey simple lessons to us at any age. Today, we'll look at the story of Clever Elsa. --------------------- Elsa was a serving girl who

Patterns for Kids: The Little Red Hen

I write about programming patterns quite a bit, but there are many other places where patterns are important. For much of human history, these patterns have been presented in myths and fables, to instruct the young and the less-inquisitive in virtues and mental patterns that best serve and exemplify their society. We in the

Quickie: Why Java Has No Headers

Ever noticed that Java has no header files? Instead, Java uses one file to store each public class and its functions. Why would they require each class to have its own file? It's a question of simplicity for the Java designers. The Java precompiler (as it were) builds class symbols using the file names, which

Quick Tips for Making Headers

In the world of C/C++, we use headers extensively. The basic rule is that C/CPP files contain code that becomes binaries, and H files contain the interfaces that allow us to reference them in other C files. Any program more complex than a calculator will likely contain multiple C files that are combined into

GNUTLS: Basic Connection with OpenSSL

It's an interesting problem: how to make it LOOK like we're using one library, when we're actually using a completely different one? GNUTLS comes packaged with an openssl library (-l gnutls-openssl) and associated headers (gnutls/openssl.h). They do a fairly admirable job of allowing us to keep our OpenSSL code. I've noticed a couple of problems, though: BIO_set_conn_hostname()

Tools vs APIs

If you are making a product that will employ unique self-signed certificates and private keys, how would you go about it? The two basic techniques are: Run a tool like OpenSSL's cert tool, either at user discretion or through a script Build the certificate generator directly into your program Let's take a quick look at what each

Installing GNUTLS: A Guide for the Rest of Us

The next few posts will relate to gnutls, an Open Source library designed to form encrypted SSL/TLS connections (similar to OpenSSL, but with more open licenses). The library does not have the best documentation, so this will largely serve as an example of useful techniques and processes for working with such code. Pre-Installation Before we begin,

Working with Poor Documentation: Options are Limited…

If it hasn't happened to you yet, it will: You're working with library code - say, GNUTLS. You've dug around and installed all the prerequesites, and the libraries are all set up. You're all ready to get to work... But the documentation doesn't match the headers you have. It turns out that all the documentation matches