[editor : Christopher Morgan] [publisher : Virginia Londoner, Gordon R Williamson, John E Hayes] #Magazine
#Abstract
Do you have trouble making all the pieces fall in place when you are writing a new program? Robert Tinney's cover this month symbolizes the theme of programming methods. But the symbolism is only pictorial-the process of designing and putting a new program together is often much harder than assembling an intricate jigsaw puzzle. This issue includes several articles on different aspects of programming and design: "What Is Good Documentation?" by Jim Howard; "Structured Programming and Structured Flowcharts" and the editorial, "Is This Really Necessary?", both by Editor Gregg Williams; "A Coding Sheet for FORTH," by John O Bumgarner; and "A Simple Approach to Data Smoothing," by Fred Ruckdeschel and Janice A Krinsky.
[author : Gregg Williams] #Edito
Extract : « [...] What Is Design?
Webster's New Collegiate Dictionary defines design, the verb, as "to conceive and plan." As a noun, a design is "a preliminary sketch showing the main features of something to be executed." In terms of programming, design becomes proportionately more important depending on the size of the problem: We speak of program design when we write a game program for ourselves, project design when we design and write an accounting system on an existing computer at work, and system design when we draft a proposal for a hardware/software combination that will implement a given set of requirements for a data base system. (Actually, "system design" is used in the literature to describe the design of anything larger than one program; but I wanted to make a distinction between project design and system design because of the widely varying amounts of work they require.)
In designing and writing programs, I've found that the point dividing system design from program design is the point at which I have specified the function of the program and its use of computer resources (eg: are records stored on disk in a random-access file and called as needed, or are they read into memory before any processing is done?). After this point, I am designing the program (usually a fairly straightforward — though nontrivial — process). Before this point, I'm making certain critical decisions that strongly influence the requirements and performance of the proposed implementation of the program. In this sense, such decisions will often need to be made even when I'm designing and writing a single program. I can then see that both system design and program design have enough in common so I can eliminate the modifier and speak simply of design. I can safely say then that design is concerned with making a set of performance-related decisions and specifying the program(s) that implement them. [...] »
A technique that makes programs easier to write, understand, fix, and change.
[author : Gregg Williams] #Algorithm #Listing #BASIC #Method #Programming #Book
Extract : « Structured programming — that phrase, unfamiliar to me and, I assume, to most people several years ago — is now endowed with such magical powers that most books on programming include it somewhere in their titles.
But what is structured programming? Most of us feel that it is probably good for us, like getting regular exercise or brushing our teeth after each meal. You may also think it's too complicated (not true), that it slows down programming (wrong, it usually speeds it up), or that it cannot be done unless your computer runs a language like Pascal or ALGOL (wrong again).
Simply put, structured programming is a set of techniques that makes programs easier to write, easier to understand, easier to fix, and easier to change. These techniques are simple and general and can be adapted to any computer language that has a goto statement — that includes BASIC, assembly language, FORTRAN, and COBOL. The purpose of this article is to show you a new form of notation that will help you write structured programs. But first, let's review structured programming. [...] »
Steve discusses how to use dynamic memory and floppy-disk-controller integrated circuits and presents a design that incorporates them.
[author : Steve Ciarcia] #Electronic #Memory #Storage #Book
Extract : « The term "memory expansion" no longer causes the same pained expression among computer owners as it did a few years ago. Back in the "Model T" days of personal computing, it was a major undertaking, often the largest expense of setting up a personal computer system. At that time, volatile memory integrated circuits contained only a fraction of the capacity of those available today, and mass storage often consisted of slow audio cassettes.
Back in 1975, if you were adding 32 K bytes of memory to your computer you would probably have used 256 type-2102A 1 K by 1-bit static memory chips. These cost between $2 and $5 each, and you probably would have needed a power supply larger and heavier than the computer. Believe it or not, the 2102A was a major improvement over the previous type-1101 memories (256 by 1-bit static devices). It would have taken 1024 (1 K) of the type-1101 components to make 32 K bytes.
Since that time, memory technology has progressed by leaps and bounds, and the cost per bit has dropped considerably. Many computer manufacturers now use dynamic rather than static memory. The result is much higher density, lower system cost, and easier after-market memory expansion on most computers.
The 64 K-byte personal computer system is more common than you would imagine. Adding another 16 or 32 K bytes of memory these days simply means plugging a few (8 or 16) integrated circuits into a memory expansion unit or motherboard. Usually the standard power supply suffices. [...] »
Ways to display solid objects with the removal of hidden lines and surfaces.
[author : Franklin C Crow] #Listing #Pascal #Graphics #Book
Extract : « The process of generating computer representations of three-dimensional structures has been pretty thoroughly worked out over the past fifteen years. Several books on computer graphics describe the necessary steps and commercial graphic software has been available for some time. Recently, three-dimensional graphic software has been made available even to those using microcomputers for personal or recreational purposes.
The software necessary for producing representations of simple shapes is not terribly complicated. In this article, I will try to lay out a few fundamental algorithms that can form the core of a three-dimensional graphics package. However, in order to make sense of these algorithms, considerable explanation will be necessary.
To generate an image of a three-dimensional shape, we have to have a computer-readable representation of the shape. (I will describe a couple of ways to represent shapes.) Then the data for the shape must be transformed to conform to the view of the shape that would be seen from a given point. The data must then be further transformed to fit the shape to the limits of a display surface (video display or plotter). Finally, those parts of the shape that are hidden from view, either because they exceed the limits of the display or because they are hidden by other parts of the shape, must be eliminated. [...] »
How to write clear and effective documentation.
[author : Jim Howard] #Method
Extract : « As more and more people discover the joys of owning a microprocessor the need for good documentation will continue to grow. Information will be needed at all levels, from detailed hardware and software documentation to descriptions of which buttons to push to play your favorite game.
Who will provide this information? The simple answer is that those who know will tell those who don't know. It sounds simple, but it's not. Everywhere, complaints are made about documentation — "inadequate," "erroneous," "over my head," "bad or nonexistent," and so on. All too often, companies market excellent systems with poor or sketchy documentation, resulting in unhappy customers and unsatisfactory sales.
It's a common mistake to believe that because somebody is an expert in a subject, he can explain it to others. For example, it's assumed that a professor who knows a subject inside and out can pass on this information to students. However, whether he can or cannot depends on something else besides his knowledge of the subject. It depends on his ability to put himself in the place of the users, the students, to begin where they are, using their language and their knowledge level. (Of course, if there is a failure to communicate, it is the students who fail, not the professor!)
The microprocessor industry is a classic example of the communication problem. Aside from a few shining lights, microprocessor literature suffers from a bad case of "the jargons." The problem was not as serious while the technology was being pursued by only a few hobbyists, who like to work things out for themselves. Now that the public is becoming involved in large numbers, the information must adapt to the customer, not the other way around.
Many could undoubtedly do a better job of communicating if they followed a few principles. But doing this requires conscious dedication. And, of course, it requires principles. Those principles are what this article is about.
To translate the jargon of the expert into terms meaningful to the rest of the world, we need an interpreter. Such an interpreter is similar to the compiler or interpreter used in computers, which translates the source language into one the machine understands. In both cases, the source language is provided by the computer expert. The machine is the user in one case, the public in the other. [...] »
Images can be transformed into holograms via Fourier transforms.
[author : Mark Zimmermann] #Electronic #Listing #BASIC #Assembly #Audio #Book
Extract : « In Part 1 of this article, I introduced some of the ideas behind the Fourier transform in one dimension. Here, I will try to extend those ideas to two dimensional space. I will introduce a few of the many uses of two-dimensional spectral analysis, with particular emphasis on image processing. The main computer program that accompanies this article (see listing 1) is a 6502 assembly-language program that performs a two-dimensional transformation on a 25- by 40-pixel image. The program is specifically adapted to run on the Commodore PET microcomputer with 8 K bytes of programmable memory, but it should be a reasonably straightforward process to modify the code to work on other comparable machines. Several floating-point arithmetic routines are used from the PET's BASIC ROM (read-only memory); a table is included that describes what each routine does, so that it may be replaced by your own arithmetical procedures if necessary. [...] »
The techniques described here can aid in the interpretation of data taken from real-world situations.
[author : Fred Ruckdeschel and Janice A Krinsky] #Listing #BASIC #Mathematics #Book
Extract : « The storage and processing of data has become a major activity in modern society. Computers have created an increasing demand for data because of their highly organized storage and retrieval facilities. Computers have also provided a means for rapidly transforming data into a format that emphasizes particular aspects of the underlying information. Data and information as used in this context are not synonymous terms. The word data refers to sets of numbers. Information is the knowledge that may be derived from those numbers.
Data appears in many forms. For example, a person interested in stocks may have a history of daily quotations for a particular company. A businessman may have a weekly sales record for each item in his inventory. A hospital administrator may have a record of emergency admittances. A scientist may have a table of results from a series of experimental measurements. All these types of data, when plotted against time (or another independent variable), may contain information regarding trends. However, existing trends in the data may not be visible because they are masked by statistical fluctuations, which are often a component of any real-world measurement. [...] »
BASIC, ALGOL, and APL are compared to the English language.
[author : Jon Handel] #Listing #BASIC #APL #ALGOL #Languages #Book
Extract : « "To be a good programmer today is as much a privilege as it was to be a literate man in the sixteenth century." Andrei Ershov, USSR Academy of Sciences, Novosibirsk University
Many people would declare that Ershov is making an incongruous comparison: he compares the ability to read, a universally desirable trait, with the ability to program a computer, which fewer people deem to be a desirable trait. Stranger still, he compares reading, which is linked with the appreciation of literature and with the artistic use of language, to programming. Programming is the recording of arcane codes that make a computer perform some data manipulation. Such coding seems unconnected with art and language, yet he implies that it is. Consonant with this view, program-coding systems are called languages, but most people would find it difficult to specify any way in which a computer programming system merits the label language.
Some people are, in fact, hostile to the very idea that programming and programming languages have anything at all to do with creativity and language. Sometimes these people are confused between the computer and its human programmer, attributing programming to the computer rather than to human beings.
Programming languages are in fact languages in a meaningful sense of that word: they exhibit some of the complexity of form and function that natural languages do. Computer programming languages are much more than mere coding systems. [...] »
A modest amount of theory provides the background for building a simple program-controlled digital tone generator.
[author : Thomas P Orlofsky] #Electronic #Algorithm #Listing #Assembly #Audio #Book
Extract : « The computational power necessary to synthesize high-quality, polyphonic computer music in real time exceeds the resources of the currently available microprocessors. Despite this discouraging observation, I decided early in the fall of 1978 to design a microprocessor-based music synthesizer. My goal was to discover just how successful I would be with a minimum system constructed from readily available parts. My self-imposed design constraints included an avoidance of special-purpose hardwired logic and an intention to stick with a byte-oriented architecture.
I hesitate to call the results of my efforts a music synthesizer. A more honest description might be a program-controlled, digital tone generator. Specifically, the design generates a predetermined sequence of sinusoidal waveforms in the manner of a player piano. A binary musical score or command program specifies the pitch and duration of each note. Each instruction in the command program selects between approximately 30,000 possible pitches from 0.1 Hz to 3 kHz, and selects between 255 possible durations from 10 ms to 2.55 seconds. This relatively fine time and frequency resolution permits quite sophisticated melodic articulations such as the slur, glissando, and vibrato. While the design provides memory for 341 notes or rests, this limitation is by no means essential.
I will begin by discussing the frequency-synthesis method before diving into a more detailed description of the implementation in both hardware and software. Along the way, you will become familiar with the engineering trade-offs inherent in the design of a digital sound system. At the conclusion, some possible improvements and points of departure for your own experiments will be discussed. [...] »
[author : Stephen B Gray] #Review #LightPen
Extract : « Because it's called a light pen, and because of the way it seems to be used, many people have the incorrect impression that a light pen does something directly to the image on the video screen. In actuality, it's the other way around. A light pen contains a photodiode that detects the movement of a point of light on the video screen, determines the coordinates of that point, and branches to a specified action for that point.
For example, if you're playing tic-tac-toe, you only have to point the light pen at the square in which you want to place your X. With a scan limited to nine areas on the video screen, the photodiode detects which area you're pointing to and puts an X in that square.
Applications
As hinted above, one of the most popular applications for the light pen is games. Instead of pressing a key, you need only point the pen. This eliminates having to memorize which key does what.
Another popular application is the fast selection of items in a screen menu. Some advanced graphics programs use light pens and menus. A screen may present a selection of shapes along one side, for example. You touch one, then touch the point on the screen where you want the computer to place the shape. Using small menus along the bottom of the screen, you control the size and rotation of the shapes to create complex subjects. [...] »
[author : Tim Ahrens. Jack Browne, and Hunter Scales] #ComputerDesktop #Electronic #Review #Algorithme
Extract : « The only similarity between Tandy Corporation's new Color Computer and its older brother — the original TRS80 — is the name. Even the microprocessor has been changed. In an apparent breakaway from the Z80, the Color Computer uses the Motorola MC6809E microprocessor as the workhorse of the new silver box. In fact, when we opened the enclosure, we didn't see any semiconductors that weren't made by Motorola.
The Color Computer is totally self-contained — no bulky separate power transformers — and the only cord, the one to the wall socket, has a standard three-prong connector. It can work with any color or black-and-white television set and has provisions for joysticks, a 1500 bps (bits per second) cassette interface, and an expansion connector for preprogrammed game cartridges.
Our aim in this article is to expose the insides of the computer and show what makes it run. Using this information, you should be able to expand the Color Computer in a number of ways, with a minimum of expertise. We will also describe the graphics interface so that do-it-yourself graphics routines should be a piece of cake. [...] »
#Listing #HP #GameAdventure
#Book
Basic Computer Programs for Business, Volume I, Charles D Sternberg. Rochelle Park NJ: Hayden Book Company Inc, 1980; 25 by 20 cm, 264 pages; softcover, ISBN 0-8104-5162-X, $9.95.
Basic FORTRAN, James S Coan. Rochelle Park NJ: Hayden Book Company Inc, 1980; 15.5 by 23 cm, 248 pages, softcover, ISBN 0-8104-5168-9, $8.95.
Communicating with Microcomputers, Ian H Witten. London, England: Academic Press Inc Ltd, 1980; 15.5 by 23 cm, 164 pages, hardcover, ISBN 0-12-760750-1, $18; softcover, ISBN 0-12-760752-8, $10.50.
Computers and Programming Guide for Scientists and Engineers, second edition, Donald D Spencer. Indianapolis IN: Howard W Sams & Company Inc, 1980; 14 by 22 cm, 463 pages, softcover, ISBN 0-672-21693-0, $15.95.
The Computer in the School: Tutor, Tool, Tutee, Robert Taylor, editor. New York: Teachers College Press, 1980; 15.5 by 23.5 cm, 274 pages, softcover, ISBN 0-8077-2611-7, $14.95.
Computer/Law Journal, Volume II, Number 2, Jay Becker, editor. Los Angeles CA: Center for Computer/Law, 1980; 17.5 by 25.5 cm, 469 pages, softcover, ISSN 0164-8756, $16.
Designs of VMOS Circuits with Experiments, Robert T Stone and Howard M Berlin. Indianapolis IN: Howard W Sams & Company Inc, 1980; 14 by 22 cm, 174 pages, softcover, ISBN 0-672-21686-8, $10.95.
A Guide to FCC Equipment Authorizations, Willmar K Roberts. New Smyrna Beach FL: Willmar K Roberts, 4637 Van Kleeck Dr, 1980; 21.5 by 27.5 cm, 142 pages, softcover, ISBN none, $24.50 in North America, $29.50 elsewhere.
Introduction to Pascal, Including UCSD Pascal, Rodney Zaks. Berkeley CA: Sybex, 1980; 18 by 23 cm, 421 pages, softcover, ISBN 0-89588-050-4, $12.95.
Introduction to TRS-80 Level II BASIC and Computer Programming, Michael P Zabinski, PhD. Englewood Cliffs NJ: PrenticeHall Inc, 1980; 22.5 by 29 cm, 186 pages, hardcover ISBN 0-13-499970-3, $14.95; softcover, ISBN 0-13-499962-2, $10.95.
Micromatics, Steven K Roberts. Elmwood CT: Scelbi Publications, 1980; 22 by 29 cm, 190 pages, hardcover, ISBN none, $19.95.
Modern Microprocessor System Design, Daniel R McGlynn. Somerset NJ: John Wiley & Sons, 1980; 22.5 by 29 cm, 295 pages, hardcover, ISBN 0471-06492-0, $21.95.
The Nature of Computation: An Introduction to Computer Science, Ira Pohl and Alan Shaw. Rockville MD: Computer Science Press Inc, 1981; 16 by 23.5 cm, 397 pages, hardcover, ISBN 0-914894-12-9, $16.95.
Owning Your Home Computer, Robert L Perry. New York: Everest House, 1980; 19 by 25.5 cm, 224 pages, softcover, ISBN 0-89696-093-5, $10.95.
Personal Computers Handbook, Walter H Buchsbaum, Sc D. Indianapolis IN: Howard W Sams & Company Inc, 1980; 14 by 22 cm, 286 pages, softcover, ISBN 0-672-21724-4, $11.95.