|
|||||||||||||||||||||||||||||||||||
|
10 Reviews
|
Average Customer Review
Share your thoughts with other customers
Create your own review
|
|
Most Helpful First | Newest First
|
|
12 of 12 people found the following review helpful:
4.0 out of 5 stars
Excellent Book, Misleading Title,
By
Amazon Verified Purchase(What's this?)
This review is from: Write Portable Code: An Introduction to Developing Software for Multiple Platforms (Paperback)
This book is an excellent read. The material is presented completely, concisely, and in an easy to understand manner. However the title of this book is misleading. It really should be "Write Portable code in C". There is some limited discussion of C++, but mostly to discourage you from using it. All other languages are dismissed out of hand, or just completely ignored. As long as you understand this caveat there is much to learn from this book.
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.
8 of 9 people found the following review helpful:
4.0 out of 5 stars
I need this book,
By
This review is from: Write Portable Code: An Introduction to Developing Software for Multiple Platforms (Paperback)
Enter Brian Hook's Write Portable Code. Portability is a sort of a holy grail for programmers, and there is no lack of knowledge floating around Usenet and Internet. However, Brian Hook tried to recommend a book on the subject to a friend, and didn't find one. So he set out to write his own.
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. He does not, however, back down from tricky configurations: there are recommendations and warnings that apply to esoteric platforms, e.g. embedded environments with very limited resources. Many of the examples in the book are drawn from a cross-platform audio library (SAL) that Brian Hook has written. Seeing the concepts in the book in their actual implementation brings a lot to the table - his treatise points out both goals, possible problems, and solutions. Since the book is so C++-centric, I would have valued information on the Standard Template Library (STL). While its name promises a standard, it has a few extensions that might not always be around. Performance characteristics also vary across implementations. Brian Hook has a remarkably clear and readable language. Even though the material in the book is complex, and Hook is writing in a very to-the-point manner, every nuance of the issue gets across. A result of many hours of editing, I'm sure, and those were hours well spent. I finally managed to get the ISO, ANSI, IEEE and many of their different standards sorted out in my head, no small feat for Brian! Achieving portability is a matter of being extremely cautious, and it is surrounded by many misconceptions and myths. In that regard, Provided that Brian is right (which I'm really not qualified to tell), he becomes a sort of myth-buster. However, since he comes from a background with portability engineering at id Software and 3Dfx, he does have the history to back up his tricks. The book is very C/C++-centric, but many of the concepts are directly portable to other languages such as (yes) Java. As for the code samples, they are a bit long-winded at times, but always clear. My only gripe is that some of the Mac source code samples aren't always optimal - they are correct and work, but could sometimes have been accomplished in a less complex way. That is, however, mostly a question of form.
5 of 5 people found the following review helpful:
4.0 out of 5 stars
Good Book for C/C++, Interesting For Others,
By James Holmes "Co-Author 'Windows Developer Po... (South Central Ohio) - See all my reviews (REAL NAME)
This review is from: Write Portable Code: An Introduction to Developing Software for Multiple Platforms (Paperback)
This book is an in-depth discussion of issues involved in getting C/C++ code from one platform to another. Hook dives deep into arcane topics such as processor memory access alignment, floating point operation platform differences, and exception handling. The book's not for the faint-of-heart, and it's rather specific to C/C++; however, readers brave enough to push through the book should get interesting insights regardless of what platform and development environment they're working with.
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.
5 of 5 people found the following review helpful:
3.0 out of 5 stars
Good for beginners,
By Adam MacBeth (Seattle, WA United States) - See all my reviews
This review is from: Write Portable Code: An Introduction to Developing Software for Multiple Platforms (Paperback)
This is the only book I've seen that covers this material in-depth (The Practice of Programming by Kernighan and Pike touches on the basics). If you've never worked on the development of a piece of cross-platform software, this book will help you avoid a lot of the pitfalls that many programmers have overcome through trial and error. Otherwise, there's not much novel material here for you.
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.
1 of 1 people found the following review helpful:
2.0 out of 5 stars
A bit out of date,
By John Selbie (Seattle,WA) - See all my reviews
Amazon Verified Purchase(What's this?)
This review is from: Write Portable Code: An Introduction to Developing Software for Multiple Platforms (Paperback)
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 network programming then you are already know enough to not need this book.But if you are new to C/C++ programming or a student, then this book is likely a good read. The majority of the book builds awareness of portability issues, programming in the large, and common tools for professional programming (in the context of C/C++). In 2011, I find that most of my C an C++ compatibility issues across operating systems are largely resolved by using STL and including <stdint.h>. The latter was not standard in 2005 (when the book was published) as it is today. As such, the book spends time explaining issues that are easily resolved by relying on these include files and libraries. There is a framework library implemented in the book called "Posh" (Portable Open Source Harness) that repeats much of <stdint.h> along with some functions that handle endian-ness and floating point variations between processors. Ironically, the book fails to mention Boost, which is a popular starting point for portable C++ development. The harder C/C++ compatibility issues aren't easily resolved with header file macros. The real challenges of portable coding come from the fact that graphics, threading, I/O, networking, and APIs for making system calls vary widely between different flavors of Unix, Linux, and Windows. To which the book makes an effort to raise attention to, but very little effort on actually solving. The chapter on networking is 6 pages and doesn't go beyond declaring #defines for the subtle differences between Winsock and Unix sockets. Good luck trying to reconcile ePoll and IOCP, or the difference socket ioctl calls between platforms. The book rarely goes deep on any specific area of programming.
1 of 1 people found the following review helpful:
5.0 out of 5 stars
Packed with specifics which lend to both an overall understanding of concepts and the ability to troubleshoot common problems,
By Midwest Book Review (Oregon, WI USA) - See all my reviews
This review is from: Write Portable Code: An Introduction to Developing Software for Multiple Platforms (Paperback)
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. From avoiding common portability mistakes and finding bugs inherent in platform-specific behaviors to understanding filesystems and understanding preprocessors, Write Portable Code is packed with specifics which lend to both an overall understanding of concepts and the ability to troubleshoot common problems.
3 of 4 people found the following review helpful:
5.0 out of 5 stars
A good addition to my book collection,
This review is from: Write Portable Code: An Introduction to Developing Software for Multiple Platforms (Paperback)
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. The problem is that I work on a mixed network of Solaris, AIX, Linux, and Windows machines, and since I'm not a full-time coder it takes me a long time to figure out how to get something working on one machine to work on another. Write Portable Code has been a great resource and I've already avoided a few potential hair pulling bugs that I didn't even know were bugs!
My only complaint is that it doesn't get into deep details about moving stuff like sockets from Linux to Windows, but if Mr. Hook did this I'm sure the book would be 2000 pages long. I'm surprised no one has written a book on this topic yet, but I'm glad this one is available now.
2 of 3 people found the following review helpful:
5.0 out of 5 stars
Terrific book on good programming practice.,
By
This review is from: Write Portable Code: An Introduction to Developing Software for Multiple Platforms (Paperback)
"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 requests, minor OS upgrades, and minor hardware differences. The author fills the book with a surprising amount of information on different storage formats, different C and C++ standards and different OS-dependent APIs for such a small book.
No book could cover every possible detail of every possible software port. Instead, the author focuses on the right attitude towards writing portable code. He demonstrates by example in each chapter, with C and C++ code you can download from his web page. Although the author focuses on C and C++ for the purpose of this text, the principles apply to any language, even supposedly portable languages like Perl. It's not an expensive book for what you get. Even the most experienced programmer should find plenty to use here. The author's prose is easy and fun to read, and I laughed out loud more than once at some of his examples. I recommend this book for all programmer levels.
7 of 11 people found the following review helpful:
5.0 out of 5 stars
An excellent book with many practical ideas...,
By Thomas Duff "Duffbert" (Portland, OR United States) - See all my reviews (VINE VOICE) (TOP 500 REVIEWER) (HALL OF FAME REVIEWER) (REAL NAME)
This review is from: Write Portable Code: An Introduction to Developing Software for Multiple Platforms (Paperback)
If you're building commercial software (or even software for your own company), there's a reasonable chance you'll need to make sure it runs on more than one platform. Brian Hook's new book Write Portable Code - An Introduction To Developing Software For Multiple Platforms (No Starch Press) should appeal to you.
Contents: The Art Of Portable Software Development; Portability Concepts; ANSI C and C++; Techniques For Portability; Editing And Source Control; Processor Differences; Floating Point; Preprocessor; Compilers; User Interaction; Networking; Operating Systems; Dynamic Libraries; Filesystems; Scalability; Portability And Data; Internationalization And Localization; Scripting Languages; Cross-Platform Libraries And Toolkits; POSH; The Rules For Portability; References; Index Hook does a very nice job of writing a practical book that looks at software development techniques that aid the ability to port your code to multiple platforms. While it's not possible to guarantee compatibility in all cases, you can take solid steps to reduce the chances of painting yourself into a corner early on in the game. From a language perspective, Hook focuses on the C/C++ language, so that's the area where you'll see the most advantage as a coder. But the other chapters are applicable to just about any environment. For instance, using a number of compilers set at a very strict message level helps weed out any coding practices that may work in one environment but not another. In another case, you should carefully choose supporting software libraries (like graphic packages) based on potential portability. A platform specific library might be easier to use, but it locks you into that environment. Porting code can then become a complete rewrite instead of a matter of tweaking. Very important stuff to know and take to heart... With the ongoing battle between Windows and open source environments, the ability to cater to both might be the difference between life and death in your business. Write Portable Code might be a really good investment in your survival...
5 of 11 people found the following review helpful:
4.0 out of 5 stars
Great content, very deceptive title,
By Jack D. Herrington "engineer and author" (Silicon Valley, CA) - See all my reviews (VINE VOICE) (REAL NAME)
This review is from: Write Portable Code: An Introduction to Developing Software for Multiple Platforms (Paperback)
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. Nor is it, as the sub-title explains, about multiple platforms, if your idea about platforms includes different programming languages. It's about C. It's about C++. And it's at the operating system and process level. And that's it. And that's enough. What's sad is that someone, probably not the author, felt that it wasn't marketable as just "Writing Portable C and C++". Great content, horrible title.
|
|
Most Helpful First | Newest First
|
|
Write Portable Code: An Introduction to Developing Software for Multiple Platforms by Brian Hook (Paperback - July 15, 2005)
$34.95 $25.60
In Stock | ||