Use software and functionality from 20 years ago

Using software from 20 years ago is the only way to surely avoid software patents. Using standards, ideas, and functionality from 20 years ago is quite safe but doesn't guarantee your software is safe from patent holders.

The situation regarding audio-video patents has gotten so bad that Nokia actually recommended that the w3c consider using a 1988 video format for the HTML5 standard. From a 2007 Nokia position paper:

A second alternative would be the reference, as a baseline, of older media compression standards, of which one can be reasonably sure that related patents are expired (or are close to expiration). One example for these codecs is ITU-T Rec. H.261, which (in its first version) was ratified in November 1988. While not competitive with today’s state of the art codecs, it’s in the author’s personal experience not that far in its performance from Ogg Theora [...] The disadvantage of this approach is clearly the use of technologies that are two decades old, but that may be at least partly offset by the commercial advantage.[1]

That is to say, the "commercial advantage" of avoiding patent problems is big enough to partly justify using software from 20 years ago!

A 1990 version of that spec[1] filled in some definitions missing from the version published in (or before) November 1988[2].

Using 20 year old formats doesn't mean that you will definitely avoid all patents. Your software will surely contain optimisations and whatever features you think are useful. Some of those optimisations and features may have been developed after the format was finalised, and thus could be patented. The only way to surely avoid patent risk, is to use software from 20 years ago.

If you take a slightly different approach and decide to only use protocols or formats that are at least 20 years old, you may still encounter patent problems. Let's take a video format for example. Someone might have defined the video format in 1990 and written a player for this format. In 2010, the software from 1990 cannot possibly be the target of patent litigation. However, another player written in the year 2000 might have included a new algorithm to play the same video but using less memory. If that new algorithm was patented, then it will be valid until 2020. So using a format from 1990 isn't enough to guarantee that you're free from patent risk. To be 100% safe, you have to use software that was written 20 years ago.