Cargo Cult Programming

I recently encountered a nice example of cargo cult programming. In bug 10980 Robert Wohlrab helpfully built a large number of Debian packages with the gold linker and reported errors about unknown options. These were options supported by the GNU linker but not by gold. (I’ve now added all the options to gold).

Among the options that packages used were -g and -assert. The GNU linker accepts and ignores these options. It has never done anything with them. Why do people pass them to the linker? I can only assume that they were copied from some other linker invocation.

In today’s increasingly complex world of programming, when so much code involves integrating libraries in various ways, I expect that cargo cult programming is on the rise.

1 Comment »

  1. The Aftermath « Tapan Karecha’s Blog said,

    January 21, 2010 @ 7:20 am

    […] January 2010 Ian Taylor notes in his blog post about the seeming rise in Cargo Cult […]

RSS feed for comments on this post · TrackBack URI

You must be logged in to post a comment.