Exceptional C++

47 Engineering Puzzles, Programming Problems, and Solutions

Author: Herb Sutter

Publisher: Addison-Wesley Professional

ISBN: 9780201615623

Category: Computers

Page: 208

View: 7776

The puzzles and problems in Exceptional C++ not only entertain, they will help you hone your skills to become the sharpest C++ programmer you can be. Many of these problems are culled from the famous Guru of the Week feature of the Internet newsgroup comp.lang.c++, moderated, expanded and updated to conform to the official ISO/ANSI C++ Standard. Try your skills against the C++ masters and come away with the insight and experience to create more efficient, effective, robust, and portable C++ code.

Exceptional C++ Style

40 New Engineering Puzzles, Programming Problems, and Solutions

Author: Herb Sutter

Publisher: Addison-Wesley Professional

ISBN: 9780201760422

Category: Computers

Page: 325

View: 3823

Software "style" is about finding the perfect balance between overhead and functionality... elegance and maintainability... flexibility and excess. In Exceptional C++ Style , legendary C++ guru Herb Sutter presents 40 new programming scenarios designed to analyze not only the what but the why and help you find just the right balance in your software. Organized around practical problems and solutions, this book offers new insight into crucial C++ details and interrelationships, and new strategies for today's key C++ programming techniques--including generic programming, STL, exception safety, and more. You'll find answers to questions like: What can you learn about library design from the STL itself? How do you avoid making templated code needlessly non-generic? Why shouldn't you specialize function templates? What should you do instead? How does exception safety go beyond try and catch statements? Should you use exception specifications, or not? When and how should you "leak" the private parts of a class? How do you make classes safer for versioning? What's the real memory cost of using standard containers? How can using const really optimize your code? How does writing inline affect performance? When does code that looks wrong actually compile and run perfectly, and why should you care? What's wrong with the design of std::string? Exceptional C++ Style will help you design, architect, and code with style--and achieve greater robustness and performance in all your C++ software.

C++ Coding Standards

101 Rules, Guidelines, and Best Practices

Author: Herb Sutter,Andrei Alexandrescu

Publisher: Pearson Education

ISBN: 9780132654425

Category: Computers

Page: 240

View: 8860

Consistent, high-quality coding standards improve software quality, reduce time-to-market, promote teamwork, eliminate time wasted on inconsequential matters, and simplify maintenance. Now, two of the world's most respected C++ experts distill the rich collective experience of the global C++ community into a set of coding standards that every developer and development team can understand and use as a basis for their own coding standards. The authors cover virtually every facet of C++ programming: design and coding style, functions, operators, class design, inheritance, construction/destruction, copying, assignment, namespaces, modules, templates, genericity, exceptions, STL containers and algorithms, and more. Each standard is described concisely, with practical examples. From type definition to error handling, this book presents C++ best practices, including some that have only recently been identified and standardized-techniques you may not know even if you've used C++ for years. Along the way, you'll find answers to questions like What's worth standardizing--and what isn't? What are the best ways to code for scalability? What are the elements of a rational error handling policy? How (and why) do you avoid unnecessary initialization, cyclic, and definitional dependencies? When (and how) should you use static and dynamic polymorphism together? How do you practice "safe" overriding? When should you provide a no-fail swap? Why and how should you prevent exceptions from propagating across module boundaries? Why shouldn't you write namespace declarations or directives in a header file? Why should you use STL vector and string instead of arrays? How do you choose the right STL search or sort algorithm? What rules should you follow to ensure type-safe code? Whether you're working alone or with others, C++ Coding Standards will help you write cleaner code--and write it faster, with fewer hassles and less frustration.

More Exceptional C++

40 New Engineering Puzzles, Programming Problems, and Solutions

Author: Herb Sutter

Publisher: Addison-Wesley Professional

ISBN: 9780201704341

Category: Computers

Page: 279

View: 1578

This text contains coverage of optimization in both single and multi threaded environments. It emphasizes generic programming and using the C++ Standard Library.

More Exceptional C++

40 New Engineering Puzzles, Programming Problems, and Solutions

Author: Herb Sutter

Publisher: Addison-Wesley Professional

ISBN: 9780201704341

Category: Computers

Page: 279

View: 4696

This text contains coverage of optimization in both single and multi threaded environments. It emphasizes generic programming and using the C++ Standard Library.

C++ Template Metaprogramming

Concepts, Tools, and Techniques from Boost and Beyond

Author: David Abrahams,Aleksey Gurtovoy

Publisher: Pearson Education

ISBN: 0321623916

Category: Computers

Page: 400

View: 6202

C++ Template Metaprogramming sheds light on the most powerful idioms of today's C++, at long last delivering practical metaprogramming tools and techniques into the hands of the everyday programmer. A metaprogram is a program that generates or manipulates program code. Ever since generic programming was introduced to C++, programmers have discovered myriad "template tricks" for manipulating programs as they are compiled, effectively eliminating the barrier between program and metaprogram. While excitement among C++ experts about these capabilities has reached the community at large, their practical application remains out of reach for most programmers. This book explains what metaprogramming is and how it is best used. It provides the foundation you'll need to use the template metaprogramming effectively in your own work. This book is aimed at any programmer who is comfortable with idioms of the Standard Template Library (STL). C++ power-users will gain a new insight into their existing work and a new fluency in the domain of metaprogramming. Intermediate-level programmers who have learned a few advanced template techniques will see where these tricks fit in the big picture and will gain the conceptual foundation to use them with discipline. Programmers who have caught the scent of metaprogramming, but for whom it is still mysterious, will finally gain a clear understanding of how, when, and why it works. All readers will leave with a new tool of unprecedented power at their disposal—the Boost Metaprogramming Library. Note: CD materials are only available with the print edition.

Efficient C++

Performance Programming Techniques

Author: Dov Bulka,David Mayhew

Publisher: Addison-Wesley Professional

ISBN: 9780201379501

Category: Computers

Page: 309

View: 8190

Far too many programmers and software designers consider efficient C++ to be an oxymoron. They regard C++ as inherently slow and inappropriate for performance-critical applications. Consequently, C++ has had little success penetrating domains such as networking, operating system kernels, device drivers, and others. "Efficient C++" explodes that myth. Written by two authors with first-hand experience wringing the last ounce of performance from commercial C++ applications, this book demonstrates the potential of C++ to produce highly efficient programs. The book reveals practical, everyday object-oriented design principles and C++ coding techniques that can yield large performance improvements. It points out common pitfalls in both design and code that generate hidden operating costs. This book focuses on combining C++'s power and flexibility with high performance and scalability, resulting in the best of both worlds. Specific topics include temporary objects, memory management, templates, inheritance, virtual functions, inlining, reference-counting, STL, and much more. With this book, you will have a valuable compendium of the best performance techniques at your fingertips. 0201379503B04062001

Imperfect C++

Practical Solutions for Real-life Programming

Author: Matthew Wilson

Publisher: Addison-Wesley Professional

ISBN: 9780321228772

Category: Computers

Page: 588

View: 5049

Imperfect C++ C++, although a marvelous language, isn't perfect. Matthew Wilson has been working with it for over a decade, and during that time he has found inherent limitations that require skillful workarounds. In this book, he doesn't just tell you what's wrong with C++, but offers practical techniques and tools for writing code that's more robust, flexible, efficient, and maintainable. He shows you how to tame C++'s complexity, cut through its vast array of paradigms, take back control over your code--and get far better results. If you're a long-time C++ developer, this book will help you see your programming challenges in new ways--and illuminate powerful techniques you may never have tried. If you're newer to C++, you'll learn principles that will make you more effective in all of your projects. Along the way, you'll learn how to: Overcome deficiencies in C++'s type system Enforce software design through constraints, contracts, and assertions Handle behavior ignored by the standard-- including issues related to dynamic libraries, static objects, and threading Achieve binary compatibility between dynamically loading components Understand the costs and disadvantages of implicit conversions--and the alternatives Increase compatibility with diverse compilers, libraries, and operating environments Help your compiler detect more errors and work more effectively Understand the aspects of style that impact reliability Apply the Resource Acquisition Is Initialization mechanism to a wide variety of problem domains Manage the sometimes arcane relationship between arrays and pointers Use template programming to improve flexibility and robustness Extend C++: including fast string concatenation, a true NULL-pointer, flexible memory buffers, Properties, multidimensional arrays, and Ranges The CD-ROM contains a valuable variety of C++ compilers, libraries, test programs, tools, and utilities, as well as the author's related journal articles. New and updated imperfections, along with software libraries and example code are available online at http: //imperfectcplusplus.com. (c) Copyright Pearson Education. All rights reserved.

Advanced C++ programming styles and idioms

Author: James O. Coplien

Publisher: Addison-Wesley Professional

ISBN: N.A

Category: Computers

Page: 520

View: 1754

Software -- Programming Languages.

Effective STL

50 Specific Ways to Improve Your Use of the Standard Template Library

Author: Scott Meyers

Publisher: Pearson Education

ISBN: 0201749629

Category: Computers

Page: 260

View: 4701

"This is Effective C++ volume three - it's really that good." - Herb Sutter, independent consultant and secretary of the ISO/ANSI C++ standards committee "There are very few books which all C++ programmers must have. Add Effective STL to that list." - Thomas Becker, Senior Software Engineer, Zephyr Associates, Inc., and columnist, C/C++ Users Journal C++'s Standard Template Library is revolutionary, but learning to use it well has always been a challenge. Until now. In this book, best-selling author Scott Meyers ( Effective C++ , and More Effective C++ ) reveals the critical rules of thumb employed by the experts - the things they almost always do or almost always avoid doing - to get the most out of the library. Other books describe what's in the STL. Effective STL shows you how to use it. Each of the book's 50 guidelines is backed by Meyers' legendary analysis and incisive examples, so you'll learn not only what to do, but also when to do it - and why. Highlights of Effective STL include: Advice on choosing among standard STL containers (like vector and list), nonstandard STL containers (like hash_set and hash_map), and non-STL containers (like bitset). Techniques to maximize the efficiency of the STL and the programs that use it. Insights into the behavior of iterators, function objects, and allocators, including things you should not do. Guidance for the proper use of algorithms and member functions whose names are the same (e.g., find), but whose actions differ in subtle (but important) ways. Discussions of potential portability problems, including straightforward ways to avoid them. Like Meyers' previous books, Effective STL is filled with proven wisdom that comes only from experience. Its clear, concise, penetrating style makes it an essential resource for every STL programmer.

Ruminations on C++

A Decade of Programming Insight and Experience

Author: Andrew Koenig

Publisher: Addison-Wesley Professional

ISBN: N.A

Category: Computers

Page: 380

View: 8460

The authors begin by explaining why C++ is worth learning and then move on to the most important elements of C++. This book emphasizes understanding and practical use of the language. It explores the basics, covers inheritance and object-oriented programming, discusses templates and the powerful kind of abstraction they provide, and shows how to design and use libraries.

Generative Programming

Methods, Tools, and Applications

Author: Krzysztof Czarnecki,Ulrich Eisenecker

Publisher: Addison-Wesley Professional

ISBN: 9780201309775

Category: Computers

Page: 832

View: 7614

The authors present a grand tour of Generative Programming that is bound to become a classic. They ... focus on the generally unappreciated connection between Domain Specific Languages and Generative Programming as a motivation for future development. Their wide-ranging and practical methods for Domain Analysis and Domain Engineering describe the first steps that developers can take right now ... and are valuable both when existing systems are used or in preparation for emerging new generative technologies. - Charles Simonyi, Chief Architect at Microsoft Research and the inventor of Intentional Programming The book develops strong themes around unifying principles that tie the pieces together, most notably domain engineering and metaprogramming. Its crucial to understand that this book is not just some refreshing diversion, nor just an exposition of some noteworthy niche techniques: It is a harbinger of a broader enlightenment that opens the door to a new age. - From the Foreword by James Coplien, a Distinguished Member of Technical Staff at Lucent Technologiesm Bell Laboratories Generative Programming (GP) offers great promise to application developers. It makes the idea of mo

Programming Challenges

The Programming Contest Training Manual

Author: Steven S Skiena,Miguel A. Revilla

Publisher: Springer Science & Business Media

ISBN: 038722081X

Category: Computers

Page: 364

View: 6724

There are many distinct pleasures associated with computer programming. Craftsm- ship has its quiet rewards, the satisfaction that comes from building a useful object and making it work. Excitement arrives with the ?ash of insight that cracks a previously intractable problem. The spiritual quest for elegance can turn the hacker into an artist. Therearepleasuresinparsimony,insqueezingthelastdropofperformanceoutofclever algorithms and tight coding. Thegames,puzzles,andchallengesofproblemsfrominternationalprogrammingc- petitionsareagreatwaytoexperiencethesepleasureswhileimprovingyouralgorithmic and coding skills. This book contains over 100 problems that have appeared in previous programming contests, along with discussions of the theory and ideas necessary to - tack them. Instant online grading for all of these problems is available from two WWW robot judging sites. Combining this book with a judge gives an exciting new way to challenge and improve your programming skills. This book can be used for self-study, for teaching innovative courses in algorithms and programming, and in training for international competition. To the Reader Theproblemsinthisbookhavebeenselectedfromover1,000programmingproblemsat the Universidad de Valladolid online judge, available athttp://online-judge.uva.es.The judgehasruledonwelloveronemillionsubmissionsfrom27,000registeredusersaround the world to date. We have taken only the best of the best, the most fun, exciting, and interesting problems available.

The C Puzzle Book

Author: Feuer

Publisher: Pearson Education India

ISBN: 9788177581409

Category:

Page: 188

View: 9993

The C Puzzle Book Teaches Intermediate C Programming With An Effective And Unique Method -- And It'S Fun! Working Through Formidable Puzzles And Checking Your Results Fine Tunes Your Skills For Future Programming Challenges. This Book Is A Great Next Step For Any Programmer Who Desires A Deeper Understanding Of The C Programming Language.

Programming

Principles and Practice Using C++

Author: Bjarne Stroustrup

Publisher: Pearson Education

ISBN: 0321992784

Category: Computers

Page: 1274

View: 3298

An Introduction to Programming by the Inventor of C++ Preparation for Programming in the Real World The book assumes that you aim eventually to write non-trivial programs, whether for work in software development or in some other technical field. Focus on Fundamental Concepts and Techniques The book explains fundamental concepts and techniques in greater depth than traditional introductions. This approach will give you a solid foundation for writing useful, correct, maintainable, and efficient code. Programming with Today's C++ (C++11 and C++14) The book is an introduction to programming in general, including object-oriented programming and generic programming. It is also a solid introduction to the C++ programming language, one of the most widely used languages for real-world software. The book presents modern C++ programming techniques from the start, introducing the C++ standard library and C++11 and C++14 features to simplify programming tasks. For Beginners--And Anyone Who Wants to Learn Something New The book is primarily designed for people who have never programmed before, and it has been tested with many thousands of first-year university students. It has also been extensively used for self-study. Also, practitioners and advanced students have gained new insight and guidance by seeing how a master approaches the elements of his art. Provides a Broad View The first half of the book covers a wide range of essential concepts, design and programming techniques, language features, and libraries. Those will enable you to write programs involving input, output, computation, and simple graphics. The second half explores more specialized topics (such as text processing, testing, and the C programming language) and provides abundant reference material. Source code and support supplements are available from the author's website.

Professional C++

Author: Marc Gregoire

Publisher: John Wiley & Sons

ISBN: 1119421268

Category: Computers

Page: 1176

View: 2838

Get up to date quickly on the new changes coming with C++17 Professional C++ is the advanced manual for C++ programming. Designed to help experienced developers get more out of the latest release, this book skims over the basics and dives right in to exploiting the full capabilities of C++17. Each feature is explained by example, each including actual code snippets that you can plug into your own applications. Case studies include extensive, working code that has been tested on Windows and Linux, and the author's expert tips, tricks, and workarounds can dramatically enhance your workflow. Even many experienced developers have never fully explored the boundaries of the language's capabilities; this book reveals the advanced features you never knew about, and drills down to show you how to turn these features into real-world solutions. The C++17 release includes changes that impact the way you work with C++; this new fourth edition covers them all, including nested namespaces, structured bindings, string_view, template argument deduction for constructors, parallel algorithms, generalized sum algorithms, Boyer-Moore string searching, string conversion primitives, a filesystem API, clamping values, optional values, the variant type, the any type, and more. Clear explanations and professional-level depth make this book an invaluable resource for any professional needing to get up to date quickly. Maximize C++ capabilities with effective design solutions Master little-known elements and learn what to avoid Adopt new workarounds and testing/debugging best practices Utilize real-world program segments in your own applications C++ is notoriously complex, and whether you use it for gaming or business, maximizing its functionality means keeping up to date with the latest changes. Whether these changes enhance your work or make it harder depends on how well-versed you are in the newest C++ features. Professional C++ gets you up to date quickly, and provides the answers you need for everyday solutions.

Taligent's Guide to Designing Programs

Well-mannered Object-oriented Design in C++.

Author: N.A

Publisher: Addison-Wesley Longman

ISBN: N.A

Category: Computers

Page: 152

View: 3626

A quick overview of Object-oriented program design, with special regard for operating-system development, this book will be of the greatest interest to those developers who are working with Taligent and its operating partners, as well as many other C++ programmers who are interested in a provocative summary of good OOP techniques.

Java Puzzlers

Traps, Pitfalls, and Corner Cases

Author: Joshua Bloch,Neal Gafter

Publisher: Pearson Education

ISBN: 0321643518

Category: Computers

Page: 312

View: 1185

"Every programming language has its quirks. This lively book reveals oddities of the Java programming language through entertaining and thought-provoking programming puzzles." --Guy Steele, Sun Fellow and coauthor of The Java™ Language Specification "I laughed, I cried, I threw up (my hands in admiration)." --Tim Peierls, president, Prior Artisans LLC, and member of the JSR 166 Expert Group How well do you really know Java? Are you a code sleuth? Have you ever spent days chasing a bug caused by a trap or pitfall in Java or its libraries? Do you like brainteasers? Then this is the book for you! In the tradition of Effective Java™, Bloch and Gafter dive deep into the subtleties of the Java programming language and its core libraries. Illustrated with visually stunning optical illusions, Java™ Puzzlers features 95 diabolical puzzles that educate and entertain. Anyone with a working knowledge of Java will understand the puzzles, but even the most seasoned veteran will find them challenging. Most of the puzzles take the form of a short program whose behavior isn't what it seems. Can you figure out what it does? Puzzles are grouped loosely according to the features they use, and detailed solutions follow each puzzle. The solutions go well beyond a simple explanation of the program's behavior--they show you how to avoid the underlying traps and pitfalls for good. A handy catalog of traps and pitfalls at the back of the book provides a concise taxonomy for future reference. Solve these puzzles and you'll never again fall prey to the counterintuitive or obscure behaviors that can fool even the most experienced programmers.

Accelerated C++

Practical Programming by Example

Author: Andrew Koenig,Barbara E. Moo

Publisher: Addison-Wesley Professional

ISBN: 9780201703535

Category: Computers

Page: 336

View: 1121

Takes a practical approach to solving problems using C++. This book describes real problems and solutions, not just language features. It covers the language and standard library together.

More Effective C++

35 New Ways to Improve Your Programs and Designs

Author: Scott Meyers

Publisher: Pearson Education

ISBN: 013279747X

Category: Computers

Page: 336

View: 9968

More than 150,000 copies in print! Praise for Scott Meyers’ first book, Effective C++: “I heartily recommend Effective C++ to anyone who aspires to mastery of C++ at the intermediate level or above.” – The C/C++ User’s Journal From the author of the indispensable Effective C++, here are 35 new ways to improve your programs and designs. Drawing on years of experience, Meyers explains how to write software that is more effective: more efficient, more robust, more consistent, more portable, and more reusable. In short, how to write C++ software that’s just plain better. More Effective C++ includes: Proven methods for improving program efficiency, including incisive examinations of the time/space costs of C++ language features Comprehensive descriptions of advanced techniques used by C++ experts, including placement new, virtual constructors, smart pointers, reference counting, proxy classes, and double-dispatching Examples of the profound impact of exception handling on the structure and behavior of C++ classes and functions Practical treatments of new language features, including bool, mutable, explicit, namespaces, member templates, the Standard Template Library, and more. If your compilers don’t yet support these features, Meyers shows you how to get the job done without them. More Effective C++ is filled with pragmatic, down-to-earth advice you’ll use every day. Like Effective C++ before it, More Effective C++ is essential reading for anyone working with C++.