ABSTRACT

Using a simple computational task (term frequency) to illustrate different programming styles, Exercises in Programming Style helps readers understand the various ways of writing programs and designing systems. It is designed to be used in conjunction with code provided on an online repository. The book complements and explains the raw code in a way that is accessible to anyone who regularly practices the art of programming. The book can also be used in advanced programming courses in computer science and software engineering programs.

The book contains 33 different styles for writing the term frequency task. The styles are grouped into nine categories: historical, basic, function composition, objects and object interactions, reflection and metaprogramming, adversity, data-centric, concurrency, and interactivity. The author verbalizes the constraints in each style and explains the example programs. Each chapter first presents the constraints of the style, next shows an example program, and then gives a detailed explanation of the code. Most chapters also have sections focusing on the use of the style in systems design as well as sections describing the historical context in which the programming style emerged.

part |4 pages

Part I Historical

chapter 1|10 pages

Good Old Times

chapter 2|8 pages

Go Forth

part |4 pages

Part II Basic Styles

chapter 3|6 pages

Monolithic

chapter 4|8 pages

Cookbook

chapter 5|10 pages

Pipeline

chapter 6|6 pages

Code Golf

part |4 pages

Part III Function Composition

chapter 7|6 pages

Infinite Mirror

chapter 8|6 pages

Kick Forward

chapter 9|6 pages

The One

part |4 pages

Part IV Objects and Object Interaction

chapter 10|8 pages

Things

chapter 11|6 pages

Letterbox

chapter 12|6 pages

Closed Maps

chapter 13|8 pages

Abstract Things

chapter 14|6 pages

Hollywood

chapter 15|6 pages

Bulletin Board

part |4 pages

Part V Reflection and Metaprogramming

chapter 16|4 pages

Introspective

chapter 17|6 pages

Reflective

chapter 18|6 pages

Aspects

chapter 19|8 pages

Plugins

part |4 pages

Part VI Adversity

chapter 20|6 pages

Constructivist

chapter 21|6 pages

Tantrum

chapter 22|6 pages

Passive Aggressive

chapter 23|8 pages

Declared Intentions

chapter 24|10 pages

Quarantine

part |4 pages

Part VII Data-Centric

chapter 25|8 pages

Persistent Tables

chapter 26|6 pages

Spreadsheet

chapter 27|6 pages

Lazy Rivers

part |4 pages

Part VIII Concurrency

chapter 28|8 pages

Actors

chapter 29|4 pages

Dataspaces

chapter 30|8 pages

Map Reduce

chapter 31|6 pages

Double Map Reduce

part |4 pages

Part IX Interactivity

chapter 32|8 pages

Trinity

chapter 33|10 pages

Restful