Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your email address or mobile phone number.
Write Portable Code: An Introduction to Developing Software for Multiple Platforms Paperback – July 1, 2005
Featured Functional Programming Titles
Check out these featured titles from O'Reilly Media and distributed publishers.
Frequently Bought Together
Customers Who Bought This Item Also Bought
This sample chapter examines the issues you'll run into when moving code between processor architectures. -- Tech Republic, August 4, 2005
Within the first few chapters, Ive already learned about a new tool. -- GBGames Blog, July 21, 2005
About the Author
If you’re the author, publisher, or rights holder of this book, let ACX help you produce the audiobook.Learn more.
Top Customer Reviews
This book is really focused on writing software that will run on essentially any platform that has a C compiler, which today is almost all processors. If you need to write software that will run on embedded 16 bit processors as well as the latest 64 bit ones, then you should read this book. However, there are large classes of software that have a more limited notion of portability (such as running on most 32 bit Unix or Windows platforms, or any platform that g++ can target) where Standard C++ or Java are the way to go. Unfortunately the book does not adequately address the tradeoffs, design, and implementation decisions one should make in these cases. In particular, I am puzzled by the total lack of Java solutions.
Since the book emphasizes C programming, there is minimal content on GUI programming, Web programming, database programming, and similar areas where C programming is rarely used anymore.
The result is a tome that should reside on every programmers desk sooner or later. The book's cover pictures a donkey striving uphill, and I can definitely releate to that. Portability is not only a target hard to aquire, but it is also a target roaming about in a minefield. I consider myself a best-practice programmer: stability and portability is important to me. However, while reading this book, I quickly realized that I know nothing. Each and every chapter contained possible gotchas that have eluded me for years. This book does two things: it points out those gotchas, and it gives the reader oodles of clever tricks, background info and solutions. And best of all, those tricks are often of the stablest possible quality.
Diving into this book, I had to break up old ideas about what is safe and not. For can you rely on sizeof(int)? Are you sure main() is your entry point? What if you need to move to a mixed-endian platform? Westwood's assumptions about floating point behaviour made it impossible for Aspyr to implement network play across platforms for Command & Conquer: Generals. Deciding on portability is also a matter of choosing your platforms. Hook points out that you can write a program that runs the same on a clustered super computer as well as a coffee machine, but it doesn't make much sense. Instead, establishing a baseline will go a long way towards keeping your sanity.Read more ›
The first half of this book decribes the method for writing portable code with a good high-level philosophy (introduce abstraction and indirection wherever necessary) as well as delving into a lot of the specifics of how to accomplish it. All the bases are covered. The second half of the book offers an unfortunately shallow review of the different subsystems that differ between platforms without giving any real options for how to bridge the gaps.
Overall, the book is well written and correct. On the downside there's nothing ground-breaking here and the effective length of the book is about half of its actual length given the disappointing second half.
This appears to be a great resource for folks who are actively porting software. It's a very good guidebook of issues to address if you're even thinking about porting. I'd also say it's a good skimming read for most developers if only to get an understanding of some engineering principles to consider when building your systems. You never know when your platform might fold or get deprecated.
Most Recent Customer Reviews
This book does a really great job at talking about code portability. It definitely was an eye opener. Read morePublished 11 months ago by Sean P. Richards
Lots of good info about specific low-level system differences for C/C++ program implementations across platforms. Read morePublished on December 30, 2013 by Amazon Customer
I would not recommend this book for an experienced programmer. If you know that sizeof(int) can vary, CRLF vs LF differences on Windows and Unix, and what little-endian is to... Read morePublished on October 1, 2011 by John Selbie
Brian Hook's Write Portable Code: An Introduction To Developing Software For Multiple Platforms covers all the basics of writing code for cross-platform use. Read morePublished on September 5, 2005 by Midwest Book Review
"Write Portable Code" is not just about writing code that ports from one OS to another or from one architecture to another; it's about writing code that will handle new feature... Read morePublished on August 18, 2005 by Jimmy
This is an excellent book about writing C and C++ that it agnostic to the operating system. It is not a general book about writing portable code. Read morePublished on August 2, 2005 by Jack D. Herrington
As a full time system administrator I don't get much chance to program, but on occasion I have to write little utilities that something like Python or Perl might be too slow for. Read morePublished on July 28, 2005 by John Krane