The {canonical} example of a brute-force algorithm is associated with the `traveling salesman problem' (TSP), a classical {NP-}hard problem: Suppose a person is in, say, Boston, and wishes to drive to N other cities. In what order should the cities be visited in order to minimize the distance travelled? The brute-force method is to simply generate all possible routes and compare the distances; while guaranteed to work and simple to implement, this algorithm is clearly very stupid in that it considers even obviously absurd routes (like going from Boston to Houston via San Francisco and New York, in that order). For very small N it works well, but it rapidly becomes absurdly inefficient when N increases (for N = 15, there are already 1,307,674,368,000 possible routes to consider, and for N = 1000 — well, see {bignum}). Sometimes, unfortunately, there is no better general solution than brute force. See also {NP-}.

A more simple-minded example of brute-force programming is finding the smallest number in a large list by first using an existing program to sort the list in ascending order, and then picking the first number off the front.

Whether brute-force programming should actually be considered stupid or not depends on the context; if the problem is not terribly big, the extra CPU time spent on a brute-force solution may cost less than the programmer time it would take to develop a more `intelligent' algorithm. Additionally, a more intelligent algorithm may imply more long-term complexity cost and bug-chasing than are justified by the speed improvement.

Ken Thompson, co-inventor of Unix, is reported to have uttered the epigram "When in doubt, use brute force". He probably intended this as a {ha ha only serious}, but the original Unix kernel's preference for simple, robust, and portable algorithms over {brittle} `smart' ones does seem to have been a significant factor in the success of that OS. Like so many other tradeoffs in software design, the choice between brute force and complex, finely-tuned cleverness is often a difficult one that requires both engineering savvy and delicate esthetic judgment.

:brute force and ignorance: /n./ A popular design technique at many software houses — {brute force} coding unrelieved by any knowledge of how problems have been previously solved in elegant ways. Dogmatic adherence to design methodologies tends to encourage this sort of thing. Characteristic of early {larval stage} programming; unfortunately, many never outgrow it. Often abbreviated BFI: "Gak, they used a {bubble sort}! That's strictly from BFI." Compare {bogosity}.

:BSD: /B-S-D/ /n./ [abbreviation for `Berkeley Software Distribution'] a family of {{Unix}} versions for the {DEC} {VAX} and PDP-11 developed by Bill Joy and others at {Berzerkeley} starting around 1980, incorporating paged virtual memory, TCP/IP networking enhancements, and many other features. The BSD versions (4.1, 4.2, and 4.3) and the commercial versions derived from them (SunOS, ULTRIX, and Mt. Xinu) held the technical lead in the Unix world until AT&T's successful standardization efforts after about 1986, and are still widely popular. Note that BSD versions going back to 2.9 are often referred to by their version numbers, without the BSD prefix. See {4.2}, {{Unix}}, {USG Unix}.

:BUAF: // /n./ [abbreviation, from alt.fan.warlord] Big Ugly ASCII Font — a special form of {ASCII art}. Various programs exist for rendering text strings into block, bloob, and pseudo-script fonts in cells between four and six character cells on a side; this is smaller than the letters generated by older {banner} (sense 2) programs. These are sometimes used to render one's name in a {sig block}, and are critically referred to as `BUAF's. See {warlording}.

:BUAG: // /n./ [abbreviation, from alt.fan.warlord] Big Ugly ASCII Graphic. Pejorative term for ugly {ASCII art}, especially as found in {sig block}s. For some reason, mutations of the head of Bart Simpson are particularly common in the least imaginative {sig block}s. See {warlording}.

:bubble sort: /n./ Techspeak for a particular sorting technique in which pairs of adjacent values in the list to be sorted are compared and interchanged if they are out of order; thus, list entries `bubble upward' in the list until they bump into one with a lower sort value. Because it is not very good relative to other methods and is the one typically stumbled on by {naive} and untutored programmers, hackers consider it the {canonical} example of a naive algorithm. The canonical example of a really *bad* algorithm is {bogo-sort}. A bubble sort might be used out of ignorance, but any use of bogo-sort could issue only from brain damage or willful perversity.

:bucky bits: /buh'kee bits/ /n./ 1. obs. The bits produced by the CONTROL and META shift keys on a SAIL keyboard (octal 200 and 400 respectively), resulting in a 9-bit keyboard character set. The MIT AI TV (Knight) keyboards extended this with TOP and separate left and right CONTROL and META keys, resulting in a 12-bit character set; later, LISP Machines added such keys as SUPER, HYPER, and GREEK (see {space-cadet keyboard}). 2. By extension, bits associated with `extra' shift keys on any keyboard, e.g., the ALT on an IBM PC or command and option keys on a Macintosh.