Think Like a Programmer

An Introduction to Creative Problem Solving
by V. Anton Spraul

August 2012, 256 pp.
ISBN: 978-1-59327-424-5

Examples in this book are written in C++, but will improve your ability to think like a programmer in any language.

The real challenge of programming isn't learning a language's syntax—it's learning to creatively solve problems so you can build something great. In this one-of-a-kind text, author V. Anton Spraul breaks down the ways that programmers solve problems and teaches you what other introductory books often ignore: how to Think Like a Programmer. Each chapter tackles a single programming concept, like classes, pointers, and recursion, and open-ended exercises throughout challenge you to apply your knowledge. You'll also learn how to:

  • Split problems into discrete components to make them easier to solve
  • Make the most of code reuse with functions, classes, and libraries
  • Pick the perfect data structure for a particular job
  • Master more advanced programming tools like recursion and dynamic memory
  • Organize your thoughts and develop strategies to tackle particular types of problems

Although the book's examples are written in C++, the creative problem-solving concepts they illustrate go beyond any particular language; in fact, they often reach outside the realm of computer science. As the most skillful programmers know, writing great code is a creative art—and the first step in creating your masterpiece is learning to Think Like a Programmer.


About the Author

V. Anton Spraul has taught introductory programming and computer science for more than 15 years. This book is a distillation of the techniques he has used and honed over many one-on-one sessions with struggling programmers. He is also the author of Computer Science Made Simple (Broadway).


Table of Contents

Introduction

Chapter 1: Strategies for Problem Solving
Chapter 2: Pure Puzzles
Chapter 3: Solving Problems with Arrays
Chapter 4: Solving Problems with Pointers and Dynamic Memory
Chapter 5: Solving Problems with Classes
Chapter 6: Solving Problems with Recursion
Chapter 7: Solving Problems with Code Reuse
Chapter 8: Thinking Like a Programmer

Index

View the Index (PDF)
View the detailed Table of Contents (PDF)

(top)

Reviews

"The author is obviously very knowledgeable and experienced with teaching hard concepts to new learners and this shows in his no-nonsense, down-to-earth but enjoyable writing style."
—Adrian Woodhead, Slashdot (Read More)

Featured in Develop Magazine's October 2012 issue! (Read More)

"Spraul has taught intro computer science classes for over fifteen years and it shows. He does a great job showing the theory using concrete examples, and rightfully puts a great deal of emphasis on programming exercises to strengthen the concepts."
—Ariane Coffin, Wired.com's GeekMom (Read More)

"The combination of conceptual overview and common problem-solving techniques that are applicable to many applications make this a particularly feasible way to supplement or review programming skills while learning a systematic approach to problem solving."
—Choice Magazine

"This is one of the most helpful books I've read, due to the fact that it guides you towards designing a system for yourself, as opposed to encouraging a mindset where there can be only one correct method."
—Lucas Westermann, Full Circle Magazine

"The book is well-written, with tons of excellent advice and solid, well-thought-out examples. If you’re willing to devote some time to studying the material, you’ll soon find yourself equipped with an impressive array of problem-solving strategies and, maybe, a new outlook on programming."
—Phil Bull, author of the official Ubuntu documentation (Read More)

"I guarantee if you work through the entire book you will stretch your brain."
—David Bolton, About.com C/C++/C# (Read More)

"I would definitely recommend this book as a companion to whatever text is used to introduce [new students] to programming and/or program logic."
—Joe Saur, The ACM's Software Engineering Notes Magazine

"[V. Anton Spraul's] advice is simple, straightforward, and practical. It's an easy—and valuable—read."
—James Powell, Enterprise Systems (Read More)

"I highly recommend Think Like a Programmer to anyone who wants to hone their creative problem-solving skills or to anyone who has learned to program, but doesn't feel that they fully understand the concepts."
—Robert Perkins, Game Vortex (Read More)

"This is definitely a book that I would use in teaching programming to others."
—Stephen Chapman, Ask Felgall (Read More)

(top)

Updates

(show updates)(top)