Histories dedicated to "how we got that way" tend to be depressing reading -- partly, perhaps, because people's minds usually turn to such questions when "that way" has gone sour. For want of a more elastic term, we could call "Connections" a history of technology, and those who feel that technology has gone sour in our time can (and do) call upon an impressive array of evidence.

On the whole, however, "Connections" is a history of how things have gone right. Most of the names in it are unfamiliar to the average reader -- names like Henry Maudslay and Honore le Blanc, Floris Nollet and Frederick Holmes. These are people who perfected, for example, an improved kind of metal-working lathe, or an electrolytic method of generating hydrogen and oxygen from water. Their stores could be incredibly dull, but in James Burke's hands they are emphatically interesting.

In Burke's survey, the road to the present is signposted by eight inventions that have made life today strikingly different from life a century ago: atomic energy, the computer, the telephone, assembly-line production, plastics, aircraft, the guided rocket and television. He traces each of these developments back to its origins through "a sequence of closely connected events extending from the ancient world until the present day," and on the way he introduces the reader to a remarkable variety of people, societies, ideas and ways of using those ideas.

Take the binary system, for example -- the simple code involving only two mathematical symbols, 0 and 1, on which the entire technology of the computer is based. Long before electronics existed, an analogue of this code was used in the running of playthings, automated puppets and the mechanical organs for which Mozart and Haydn wrote music.

The principle is simple, and perhaps most familiar in the toy music boxes which most people have taken apart at one time or another. Inside the music box is a little cylinder with pegs sticking up at carefully selected places. The cylinder rotates next to a set of tuned metal prongs. When a peg encounters a prong, a note is sounded; when there is no peg, the prong is silent. Arrange the pegs properly and you have melody, harmony, counterpoint, all derived from a simple system of go or no-go.

In 18th-century France, the system was adapted, using punched rolls of paper (like those in a player piano) to regulate the complicated arrangement of threads for weaving silk into textured fabrics. It was so successful that the workers revolted and the system was abandoned. Revived and improved in the next century, using punched cards instead of paper rolls, it became a basic part of the textile industry. Then the punched cards came to the attention of a census bureau employe during the 1880s, and he adapted it for use in tabulating the results of the 1890 census. Thus, the principle of the music box was converted into an essentially computerized system doing the work of computers before the turn of the century.

This is only one of the many strands Burke has woven into his tapestry of the advance of human knowledge -- perhaps the least complicated of them, but also the one with the least incidental human interest. In tracing other threads, he fills his book with little stories of challenges and struggles, perserverance, ingenuity and small triumphs that grow through the centuries as one bit of knowledge is fitted into another. It is material readily available to anyone who deals in this specialized branch of history, but Burke displays a unique ability to bring it to life on the page -- ably assisted by some well-chosen and well-reproduced illustrations.

For the average reader, the most remarkable result of exposure to this book will probably be a new look at the Middle Ages. Generally considered a period of stagnation -- particularly in technology -- these centuries turn out, in Burke's account, to be a time of constant change and development while the much-vaunted Renaissance seems to be a period of relative inactivity.

No doubt, part of the reason for the common misunderstanding of the Middle Ages is that our ideas of that period were handed down by the Renaissance. But another reason is that medieval technology was not spectacular. The button is a medieval invention -- insignificant compared to dynamos and internal combustion engines. But what would our life be without buttons? Medieval technology is largely a technology of buttons and knitting needles, windows and glassmaking, chimneys, improvements in harness for horses, obsolete weapons and curious ways of building walls to withstand siege. But from such small beginnings, great things have grown -- and there is deep fascination in the way Burke traces the process and relates technology to everyday life.

The book that most closely parallels "Connections" is probably "The Ascent of Man," a slightly less specialized study but similar in orientation and also based on a series of programs prepared for BBC television. If the series (to begin Sept. 30) is anywhere near equal to the book, its appearance on public television in this country should be one of the highlights of the new season.