Originally built in the mid to late 2000’s to create unique codes based on a prescribed pattern.

We used it to generate codes that were printed under the liners of bottle caps for marketing campaigns in Nigeria. The codes needed to unique, non-sequential and follow a pattern required by the mobile SMS company who were validating the codes.

The first version maintained a list of codes, and for each new code, first checked if the code already existed. As you can imagine, performance was terrible, but it was a lot faster than the manual process the agency used before. An improved version used an in-memory SQLite database with a unique constraint on the column.

The original REALBasic code is lost, but the binaries and a version rewritte in Python are available on Github.