DDJ, April 1999 -- Algorithms


[April cover]

FEATURES

REGULAR EXPRESSIONS

by Brian W. Kernighan and Rob Pike

Regular expressions, one of the most broadly applicable of programmer's tools, provide a compact and expressive notation for describing patterns of text. They are also algorithmically interesting, easy to implement, and highly useful. Brian and Rob, who are researchers at Bell Labs and the authors of The Practice of Programming, present a compact implementation of grep that uses regular expressions.

DESIGNING ALGORITHMS INCREMENTALLY

by Udi Manber

The incremental approach to addressing algorithmic problems Udi presents here is particularly useful as a way of arriving at possible new algorithms.

THREAD COMMUNICATION IN PARALLEL ALGORITHMS

by Lalit Pant

With the increasing availability of multiprocessing hardware, thread-based parallel algorithms are becoming more and more important. Lalit presents thread communication mechanisms for use within parallel algorithms.

SIMULATED RECURSION

by Earl Augusta

Recursion is a powerful tool for attacking problems where questions are repeated and the same actions are performed. C and Pascal allow recursion, but languages like COBOL generally forbid it.

THE HMAC ALGORITHM

by William Stallings

The Message Authentication Code (MAC) is a widely used technique for performing message authentication. HMAC (short for "keyed-Hashing for Message Authentication"), a variation on the MAC algorithm, has emerged as an Internet standard for a variety of applications.

THE PALMPILOT'S INFRARED PORT

by A.J. Musgrove

One of the powerful Palm III features is its support of data exchange over InfraRed (IR) ports. A.J. explores programming the IR port by presenting both an IR test application and a version of the venerable game BattleShip that can be played between two players via the IR port.

EMBEDDED SYSTEMS

PARALLEL FUNCTIONAL DECISION TREES

by Rene Schaad

Rene presents an approach to programming reactive situated agents that's based on parallel functional decision trees. In the process, he introduces "InSitu," a C++ class library and run-time system he's developed and tested on mobile robots.

INTERNET PROGRAMMING

EXAMINING PERLDAP

by Troy Neeriemer

Netscape's PerLDAP is an important tool for both programmers and administrators because it provides a mechanism for accessing directory information from Perl. Troy presents a high-level overview of PerLDAP, along with details of how you can use it.

PROGRAMMER'S TOOLCHEST

EXAMINING JPYTHON

by Kirby W. Angell

JPython is a freely available version of Python implemented in 100 percent pure Java. Since JPython is written in Java, it is easy to include the JPython packages in a Java application and use JPython as your application's scripting engine. JPython also makes an excellent tool for prototyping Java applets that are embedded in web browsers.

PORTING C++ CODE FROM NT TO UNIX

by George F. Frazier

When porting large C++ programs from Windows to UNIX, it makes sense to use a tool that implements the Windows API natively on the target system. George uses MainSoft's MainWin XDE (eXtended Development Environment) 3.1 to port a major application from Windows NT to Solaris.

COLUMNS

PROGRAMMING PARADIGMS

by Michael Swaine

Michael separates the blarney from the chaff this month, as he meanders through the world of computing.

C PROGRAMMING

by Al Stevens

Before putting the "scroll" back in his scrolling editor, Al asks the questions "What is Java?" and "Who the heck you gonna believe, anyway?"

JAVA Q&A

by Steve Ball and John Miller Crawford

A Java applet may seem to be an independent program, but in one crucial aspect it is not--if you change a static field of a class used within an applet, that change pervades all applets. Steve and John examine the ins-and-outs of dealing with this particularity.

ALGORITHM ALLEY

by Jon Bentley

This month, Jon presents tools and techniques for analyzing the performance of algorithms. Next month, he examines how code-tuning techniques speed up the various algorithms.

DR. ECCO'S OMNIHEURIST CORNER

by Dennis E. Shasha

The plans for a modular spacestation are up in the air, until Dr. Ecco and crew introduce some down-to-earth solutions.

PROGRAMMER'S BOOKSHELF

by Gregory V. Wilson and Steve Chartley

Greg looks at Tom Armstrong's The Active Template Library, Jim Coplien's Multi-Paradigm DESIGN for C++, and Carlton Egremont's Mr. Bunny's Guide to Active X, while Steve Chartley tackles Patterns in Java, by Mark Grand.

FORUM

EDITORIAL

by Jonathan Erickson

LETTERS

by you

NEWS & VIEWS

by the DDJ staff

OF INTEREST

by Eugene Eric Kim

SWAINE'S FLAMES

by Michael Swaine