SMS trailers at Uboot

We developed a cool algorithm to add informational trailer texts to SMS at Uboot. It was online from mid 2000 to mid 2011 (when Uboot stopped doing SMS). I developed this algorithm together with my colleague Mike. So that it doesn't get lost forever, here is a description of it :-)

The general situation was this:


We came up with the following solution. We called it "Table with Wildcards". Inspired by crontab, we used a file, one line of the file per rule.

For example:

language  recipient-registered    text
en        yes                     Sent by ${USER} on Uboot
en        no                      Sent by ${USER} on
en        yes                     Sent by Uboot
en        no                      Sent by 
*         *                       Uboot
*         no            
de        yes                     Verschickt von ${USER} auf Uboot

The algorithm would do the following, when sending a particular SMS:

The advantage of this algorithm is, given two users who send an SMS with the same amount of space free, different trailers may be the longest, depending on how long their username is.

This article is © Adrian Smith.
It was originally published on 8 Jan 2013
More on: Things I've Released | Algorithms |