Steve Maguire

Writing Solid Code

Development Philosophies for Writing Bug-Free Programs

Writing Solid Code tackles the serious problem of how to write bug-free code by sharing proven development strategies that help you catch bugs automatically, with little or no effort, and help you eliminate entire classes of bugs altogether.

Buy the Book

The Book

Writing rock-solid, bug-free code isn’t something that just happens any more than writing efficient code or secure code just happens. To write efficient or secure code, you have to think about coding in a specific way and you need to make tradeoffs in your designs to achieve those goals. Writing rock-solid, bug-free code is no different. If your goal is to have code that flat-out works, you need to develop a heightened awareness of how and why bugs come about and make tradeoffs in your designs based on how difficult they will be to implement and maintain without introducing bugs.

When was the last time you asked yourself, “How risky is this design?”

What about this question: “How will programmers unintentionally misuse this library I’m coding?”

Have you ever considered that using defensive programming actually hides bugs in your code because it silently corrects misbehavior? Does that mean you should stop using defensive programming? Of course not. But you do need to be aware that the practice hides bugs and take additional steps to make those hidden bugs noticeable during development.

Writing solid code is a mindset, a set of philosophies, a way of thinking about how you code that makes it much, much, less likely that you’ll introduce bugs into your master sources.

And not just you, but everyone on your team.

Writing Solid Code is written by a former Senior Level Microsoft developer. The book takes on the problem of software errors by examining the kinds of mistakes developers typically make.

The key to writing rock-solid, bug-free code is to develop a heightened awareness of how and why bugs come about. Programmers can gain that awareness by asking two simple questions for every bug they find: “How could I have prevented this bug?” and “How could I have automatically detected this bug?” The philosophies presented in this book are the results of experienced programmers regularly asking these two questions over many years.

The book’s examples are in the C programming language, but the philosophies apply to any language. This book won’t teach you how to be a C programmer. It will help you develop philosophies that are timeless and transferable to any language.

The first edition became an instant best-seller, was translated into 16 different languages, and was used in colleges and universities around the world. It won the prestigious Software Development Jolt Productivity Award and awards from the Society for Technical Communication. It influenced a generation of developers.

Here’s what critics have said,

“Maguire’s writing style is fluid and clear, and the content is intended to provoke both thought and actions (namely changes in your bad habits).” — Ray Valdés, Dr. Dobb’s Journal

“This unique volume gathers a wealth of coding wisdom developed over the years inside Microsoft. These aren’t coding techniques so much as coding and testing philosophies — mindsets that help Microsoft’s programmers produce better code with fewer bugs in less time than their competitors.” — Jeff Duntemann, PC Techniques

Writing Solid Code is superbly written and offers a variety of sound practical coding guidelines at a level suitable for the professional coder. The author’s experience, coupled with an obvious enthusiasm for the subject, has resulted in a book which is both informative and easy to read… You’ll find historical notes about the development of programs such as Microsoft Excel and Word… An excellent book and one of those relatively rare offerings that all programmers would do well to read.” — Paul Overaa, Computing

“If you are serious about developing code, read this book. Consider it carefully. Reject it if you will, but I think you would be foolish to do so. This is easily my ‘Book of the year.’” — C Vu

You can find Writing Solid Code in both electronic and print-on-demand formats at Amazon.com.