Modern C Programming with Test Driven Development

Author: Jeff Langr
Publisher: CreateSpace
ISBN: 1502445115
Release Date: 2014-09-21
Genre: Computers

If you program in C++ you've been neglected. Test-driven development (TDD) is a modern software development practice that can dramatically reduce the number of defects in systems, produce more maintainable code, and give you the confidence to change your software to meet changing needs. But C++ programmers have been ignored by those promoting TDD--until now. In this book, Jeff Langr gives you hands-on lessons in the challenges and rewards of doing TDD in C++. Modern C++ Programming With Test-Driven Development, the only comprehensive treatment on TDD in C++ provides you with everything you need to know about TDD, and the challenges and benefits of implementing it in your C++ systems. Its many detailed code examples take you step-by-step from TDD basics to advanced concepts. As a veteran C++ programmer, you're already writing high-quality code, and you work hard to maintain code quality. It doesn't have to be that hard. In this book, you'll learn: how to use TDD to improve legacy C++ systems how to identify and deal with troublesome system dependencies how to do dependency injection, which is particularly tricky in C++ how to use testing tools for C++ that aid TDD new C++11 features that facilitate TDD As you grow in TDD mastery, you'll discover how to keep a massive C++ system from becoming a design mess over time, as well as particular C++ trouble spots to avoid. You'll find out how to prevent your tests from being a maintenance burden and how to think in TDD without giving up your hard-won C++ skills. Finally, you'll see how to grow and sustain TDD in your team. Whether you're a complete unit-testing novice or an experienced tester, this book will lead you to mastery of test-driven development in C++. What You Need A C++ compiler running under Windows or Linux, preferably one that supports C++11. Examples presented in the book were built under gcc 4.7.2. Google Mock 1.6 (downloadable for free; it contains Google Test as well) or an alternate C++ unit testing tool. Most examples in the book are written for Google Mock, but it isn't difficult to translate them to your tool of choice. A good programmer's editor or IDE. cmake, preferably. Of course, you can use your own preferred make too. CMakeLists.txt files are provided for each project. Examples provided were built using cmake version 2.8.9. Various freely-available third-party libraries are used as the basis for examples in the book. These include: - cURL- JsonCpp- Boost (filesystem, date_time/gregorian, algorithm, assign)Several examples use the boost headers/libraries. Only one example uses cURL and JsonCpp.

Modern C Programming with Test Driven Development

Author: Jeff Langr
Publisher: Pragmatic Bookshelf
ISBN: 1937785483
Release Date: 2013
Genre: Computers

If you program in C++ you've been neglected. Test-driven development (TDD) is a modern software development practice that can dramatically reduce the number of defects in systems, produce more maintainable code, and give you the confidence to change your software to meet changing needs. But C++ programmers have been ignored by those promoting TDD--until now. In this book, Jeff Langr gives you hands-on lessons in the challenges and rewards of doing TDD in C++. Modern C++ Programming With Test-Driven Development, the only comprehensive treatment on TDD in C++ provides you with everything you need to know about TDD, and the challenges and benefits of implementing it in your C++ systems. Its many detailed code examples take you step-by-step from TDD basics to advanced concepts. As a veteran C++ programmer, you're already writing high-quality code, and you work hard to maintain code quality. It doesn't have to be that hard. In this book, you'll learn: how to use TDD to improve legacy C++ systems how to identify and deal with troublesome system dependencies how to do dependency injection, which is particularly tricky in C++ how to use testing tools for C++ that aid TDD new C++11 features that facilitate TDD As you grow in TDD mastery, you'll discover how to keep a massive C++ system from becoming a design mess over time, as well as particular C++ trouble spots to avoid. You'll find out how to prevent your tests from being a maintenance burden and how to think in TDD without giving up your hard-won C++ skills. Finally, you'll see how to grow and sustain TDD in your team. Whether you're a complete unit-testing novice or an experienced tester, this book will lead you to mastery of test-driven development in C++. What You Need A C++ compiler running under Windows or Linux, preferably one that supports C++11. Examples presented in the book were built under gcc 4.7.2. Google Mock 1.6 (downloadable for free; it contains Google Test as well) or an alternate C++ unit testing tool. Most examples in the book are written for Google Mock, but it isn't difficult to translate them to your tool of choice. A good programmer's editor or IDE. cmake, preferably. Of course, you can use your own preferred make too. CMakeLists.txt files are provided for each project. Examples provided were built using cmake version 2.8.9. Various freely-available third-party libraries are used as the basis for examples in the book. These include:- cURL- JsonCpp- Boost (filesystem, date_time/gregorian, algorithm, assign)Several examples use the boost headers/libraries. Only one example uses cURL and JsonCpp.

Modern C Programming with Test Driven Development

Author: Jeff Langr
Publisher: Pragmatic Bookshelf
ISBN: 9781680504026
Release Date: 2013-10-10
Genre: Computers

If you program in C++ you've been neglected. Test-driven development (TDD) is a modern software development practice that can dramatically reduce the number of defects in systems, produce more maintainable code, and give you the confidence to change your software to meet changing needs. But C++ programmers have been ignored by those promoting TDD--until now. In this book, Jeff Langr gives you hands-on lessons in the challenges and rewards of doing TDD in C++. Modern C++ Programming With Test-Driven Development, the only comprehensive treatment on TDD in C++ provides you with everything you need to know about TDD, and the challenges and benefits of implementing it in your C++ systems. Its many detailed code examples take you step-by-step from TDD basics to advanced concepts. As a veteran C++ programmer, you're already writing high-quality code, and you work hard to maintain code quality. It doesn't have to be that hard. In this book, you'll learn: how to use TDD to improve legacy C++ systems how to identify and deal with troublesome system dependencies how to do dependency injection, which is particularly tricky in C++ how to use testing tools for C++ that aid TDD new C++11 features that facilitate TDD As you grow in TDD mastery, you'll discover how to keep a massive C++ system from becoming a design mess over time, as well as particular C++ trouble spots to avoid. You'll find out how to prevent your tests from being a maintenance burden and how to think in TDD without giving up your hard-won C++ skills. Finally, you'll see how to grow and sustain TDD in your team. Whether you're a complete unit-testing novice or an experienced tester, this book will lead you to mastery of test-driven development in C++. What You Need A C++ compiler running under Windows or Linux, preferably one that supports C++11. Examples presented in the book were built under gcc 4.7.2. Google Mock 1.6 (downloadable for free; it contains Google Test as well) or an alternate C++ unit testing tool. Most examples in the book are written for Google Mock, but it isn't difficult to translate them to your tool of choice. A good programmer's editor or IDE. cmake, preferably. Of course, you can use your own preferred make too. CMakeLists.txt files are provided for each project. Examples provided were built using cmake version 2.8.9. Various freely-available third-party libraries are used as the basis for examples in the book. These include: cURL JsonCpp Boost (filesystem, date_time/gregorian, algorithm, assign) Several examples use the boost headers/libraries. Only one example uses cURL and JsonCpp.

Test Driven Development for Embedded C

Author: James W. Grenning
Publisher: Pragmatic Bookshelf
ISBN: 9781680504880
Release Date: 2011-04-25
Genre: Computers

Another day without Test-Driven Development means more time wasted chasing bugs and watching your code deteriorate. You thought TDD was for someone else, but it's not! It's for you, the embedded C programmer. TDD helps you prevent defects and build software with a long useful life. This is the first book to teach the hows and whys of TDD for C programmers. TDD is a modern programming practice C developers need to know. It's a different way to program---unit tests are written in a tight feedback loop with the production code, assuring your code does what you think. You get valuable feedback every few minutes. You find mistakes before they become bugs. You get early warning of design problems. You get immediate notification of side effect defects. You get to spend more time adding valuable features to your product. James is one of the few experts in applying TDD to embedded C. With his 1.5 decades of training,coaching, and practicing TDD in C, C++, Java, and C# he will lead you from being a novice in TDD to using the techniques that few have mastered. This book is full of code written for embedded C programmers. You don't just see the end product, you see code and tests evolve. James leads you through the thought process and decisions made each step of the way. You'll learn techniques for test-driving code right nextto the hardware, and you'll learn design principles and how to apply them to C to keep your code clean and flexible. To run the examples in this book, you will need a C/C++ development environment on your machine, and the GNU GCC tool chain or Microsoft Visual Studio for C++ (some project conversion may be needed).

Growing Object Oriented Software Guided by Tests

Author: Steve Freeman
Publisher: Pearson Education
ISBN: 0321699769
Release Date: 2009-10-12
Genre: Computers

Test-Driven Development (TDD) is now an established technique for delivering better software faster. TDD is based on a simple idea: Write tests for your code before you write the code itself. However, this "simple" idea takes skill and judgment to do well. Now there's a practical guide to TDD that takes you beyond the basic concepts. Drawing on a decade of experience building real-world systems, two TDD pioneers show how to let tests guide your development and “grow” software that is coherent, reliable, and maintainable. Steve Freeman and Nat Pryce describe the processes they use, the design principles they strive to achieve, and some of the tools that help them get the job done. Through an extended worked example, you’ll learn how TDD works at multiple levels, using tests to drive the features and the object-oriented structure of the code, and using Mock Objects to discover and then describe relationships between objects. Along the way, the book systematically addresses challenges that development teams encounter with TDD—from integrating TDD into your processes to testing your most difficult features. Coverage includes Implementing TDD effectively: getting started, and maintaining your momentum throughout the project Creating cleaner, more expressive, more sustainable code Using tests to stay relentlessly focused on sustaining quality Understanding how TDD, Mock Objects, and Object-Oriented Design come together in the context of a real software development project Using Mock Objects to guide object-oriented designs Succeeding where TDD is difficult: managing complex test data, and testing persistence and concurrency

Unit Test Frameworks

Author: Paul Hamill
Publisher: "O'Reilly Media, Inc."
ISBN: 9780596006891
Release Date: 2004
Genre: Computers

Most people who write software have at least some experience with unit testing-even if they don't call it that. If you have ever written a few lines of throwaway code just to try something out, you've built a unit test. On the other end of the software spectrum, many large-scale applications have huge batteries of test cases that are repeatedly run and added to throughout the development process. What are unit test frameworks and how are they used? Simply stated, they are software tools to support writing and running unit tests, including a foundation on which to build tests and the functionality to execute the tests and report their results. They are not solely tools for testing; they can also be used as development tools on a par with preprocessors and debuggers. Unit test frameworks can contribute to almost every stage of software development and are key tools for doing Agile Development and building big-free code. Unit Test Frameworks covers the usage, philosophy, and architecture of unit test frameworks. Tutorials and example code are platform-independent and compatible with Windows, Mac OS X, Unix, and Linux. The companion CD includes complete versions of JUnit, CppUnit, NUnit, and XMLUnit, as well as the complete set of code examples.

Safe C

Author: Vladimir Kushnir
Publisher: "O'Reilly Media, Inc."
ISBN: 9781449320935
Release Date: 2012-06-06
Genre: Computers

This book contains discussion of some of the most typical mistakes made by programmers in C++ and also some recipes for how to avoid each of these mistakes.

Clean C

Author: Stephan Roth
Publisher: Apress
ISBN: 9781484227930
Release Date: 2017-09-27
Genre: Computers

Write maintainable, extensible, and durable software with modern C++. This book is a must for every developer, software architect, or team leader who is interested in good C++ code, and thus also wants to save development costs. If you want to teach yourself about writing clean C++, Clean C++ is exactly what you need. It is written to help C++ developers of all skill levels and shows by example how to write understandable, flexible, maintainable, and efficient C++ code. Even if you are a seasoned C++ developer, there are nuggets and data points in this book that you will find useful in your work. If you don't take care with your code, you can produce a large, messy, and unmaintainable beast in any programming language. However, C++ projects in particular are prone to be messy and tend to slip into bad habits. Lots of C++ code that is written today looks as if it was written in the 1980s. It seems that C++ developers have been forgotten by those who preach Software Craftsmanship and Clean Code principles. The Web is full of bad, but apparently very fast and highly optimized C++ code examples, with cruel syntax that completely ignores elementary principles of good design and well-written code. This book will explain how to avoid this scenario and how to get the most out of your C++ code. You'll find your coding becomes more efficient and, importantly, more fun. What You'll Learn Gain sound principles and rules for clean coding in C++ Carry out test driven development (TDD) Discover C++ design patterns and idioms Apply these design patterns Who This Book Is For Any C++ developer and software engineer with an interest in producing better code.

Agile Java

Author: Jeff Langr
Publisher: Pearson Education
ISBN: 9780672334214
Release Date: 2005-02-14
Genre: Computers

Master Java 5.0 and TDD Together: Build More Robust, Professional Software Master Java 5.0, object-oriented design, and Test-Driven Development (TDD) by learning them together. Agile Java weaves all three into a single coherent approach to building professional, robust software systems. Jeff Langr shows exactly how Java and TDD integrate throughout the entire development lifecycle, helping you leverage today's fastest, most efficient development techniques from the very outset. Langr writes for every programmer, even those with little or no experience with Java, object-oriented development, or agile methods. He shows how to translate oral requirements into practical tests, and then how to use those tests to create reliable, high-performance Java code that solves real problems. Agile Java doesn't just teach the core features of the Java language: it presents coded test examples for each of them. This TDD-centered approach doesn't just lead to better code: it provides powerful feedback that will help you learn Java far more rapidly. The use of TDD as a learning mechanism is a landmark departure from conventional teaching techniques. Presents an expert overview of TDD and agile programming techniques from the Java developer's perspective Brings together practical best practices for Java, TDD, and OO design Walks through setting up Java 5.0 and writing your first program Covers all the basics, including strings, packages, and more Simplifies object-oriented concepts, including classes, interfaces, polymorphism, and inheritance Contains detailed chapters on exceptions and logging, math, I/O, reflection, multithreading, and Swing Offers seamlessly-integrated explanations of Java 5.0's key innovations, from generics to annotations Shows how TDD impacts system design, and vice versa Complements any agile or traditional methodology, including Extreme Programming (XP)

API Design for C

Author: Martin Reddy
Publisher: Elsevier
ISBN: 0123850045
Release Date: 2011-03-14
Genre: Computers

API Design for C++ provides a comprehensive discussion of Application Programming Interface (API) development, from initial design through implementation, testing, documentation, release, versioning, maintenance, and deprecation. It is the only book that teaches the strategies of C++ API development, including interface design, versioning, scripting, and plug-in extensibility. Drawing from the author's experience on large scale, collaborative software projects, the text offers practical techniques of API design that produce robust code for the long term. It presents patterns and practices that provide real value to individual developers as well as organizations. API Design for C++ explores often overlooked issues, both technical and non-technical, contributing to successful design decisions that product high quality, robust, and long-lived APIs. It focuses on various API styles and patterns that will allow you to produce elegant and durable libraries. A discussion on testing strategies concentrates on automated API testing techniques rather than attempting to include end-user application testing techniques such as GUI testing, system testing, or manual testing. Each concept is illustrated with extensive C++ code examples, and fully functional examples and working source code for experimentation are available online. This book will be helpful to new programmers who understand the fundamentals of C++ and who want to advance their design skills, as well as to senior engineers and software architects seeking to gain new expertise to complement their existing talents. Three specific groups of readers are targeted: practicing software engineers and architects, technical managers, and students and educators. The only book that teaches the strategies of C++ API development, including design, versioning, documentation, testing, scripting, and extensibility. Extensive code examples illustrate each concept, with fully functional examples and working source code for experimentation available online. Covers various API styles and patterns with a focus on practical and efficient designs for large-scale long-term projects.

Programming Embedded Systems in C and C

Author: Michael Barr
Publisher: "O'Reilly Media, Inc."
ISBN: 1565923545
Release Date: 1999
Genre: Computers

An introduction to embedding systems for C and C++++ programmers encompasses such topics as testing memory devices, writing and erasing Flash memory, verifying nonvolatile memory contents, and much more. Original. (Intermediate).

JavaScript Testing with Jasmine

Author: Evan Hahn
Publisher: "O'Reilly Media, Inc."
ISBN: 9781449356378
Release Date: 2013-04-15
Genre: Computers

Developers looking to keep their JavaScript code bug-free will want to unit test using Jasmine, one of the most popular unit testing frameworks around. Any project of meaningful size should be automatically tested to help catch bugs as early as possible. Jasmine, a testing framework for JavaScript, makes it easy to test JavaScript projects, from browser-based applications to Node.js. While a quick understanding of Jasmine can be gleaned from the project’s homepage, the framework has a lot of details and exciting plugins. This book explores Jasmine in a depth that can’t be found elsewhere. This book provides: Exposure to some Jasmine plugins, to extend Jasmine and allow for more functionality and more thorough testing An Understanding of Jasmine’s main features, to allow code to be automatically tested and reduce bugs An Explanation of how to get Jasmine working in different environments (in the browser, in Node.js, through Rails, et cetera), to make Jasmine easier to work with

xUnit Test Patterns

Author: Gerard Meszaros
Publisher: Pearson Education
ISBN: 9780132797467
Release Date: 2007-05-21
Genre: Computers

Automated testing is a cornerstone of agile development. An effective testing strategy will deliver new functionality more aggressively, accelerate user feedback, and improve quality. However, for many developers, creating effective automated tests is a unique and unfamiliar challenge. xUnit Test Patterns is the definitive guide to writing automated tests using xUnit, the most popular unit testing framework in use today. Agile coach and test automation expert Gerard Meszaros describes 68 proven patterns for making tests easier to write, understand, and maintain. He then shows you how to make them more robust and repeatable--and far more cost-effective. Loaded with information, this book feels like three books in one. The first part is a detailed tutorial on test automation that covers everything from test strategy to in-depth test coding. The second part, a catalog of 18 frequently encountered "test smells," provides trouble-shooting guidelines to help you determine the root cause of problems and the most applicable patterns. The third part contains detailed descriptions of each pattern, including refactoring instructions illustrated by extensive code samples in multiple programming languages.

Expert C Programming

Author: Maya Posch
Publisher: Packt Publishing Ltd
ISBN: 9781788834940
Release Date: 2018-04-13
Genre: Computers

Developing expert level application development skills with C++ Key Features - ​Take ​ ​advantage ​ ​of ​ ​the ​ ​myriad ​ ​of ​ ​features ​ ​and ​ ​possibilities ​ ​that ​ ​C++ offers ​ ​to ​ ​build ​ real-world ​ ​applications - Delve into the fundamentals of multithreading and concurrency and find out how to implement them - Learn the latest features of C++ and how to write better code by using the Standard Library Book Description C++ has ​ ​come ​ ​a ​ ​long ​ ​way ​ ​and ​ ​has ​ ​now ​ ​been ​ ​adopted ​ ​in ​ ​several ​ ​contexts. Its ​ ​key ​strengths ​ ​are ​ ​its ​ ​software ​ ​infrastructure ​ ​and ​ ​resource-constrained applications. ​ ​The ​C++ ​ ​17 ​ ​release ​ ​will ​ ​change ​ ​the ​ ​way ​ ​developers ​ ​write code, ​ ​and ​ ​this ​ ​course ​ ​will ​ ​help ​you ​ ​master ​ ​your ​ ​developing ​ ​skills ​ ​with ​ ​C++. With ​ ​real-world, ​ ​practical ​ ​examples ​ ​explaining ​ ​each ​ ​concept, ​ ​the ​ ​course is divided into three modules where ​ ​will begin ​ ​by ​ ​introducing ​ ​you ​ ​to ​ ​the ​ ​latest ​ ​features ​ ​in ​ ​C++ ​ ​17. ​ ​It ​ ​encourages clean ​code ​ ​practices ​ ​in ​ ​C++ ​ ​in ​ ​general ​ ​and ​ ​demonstrates ​ ​the ​ ​GUI app-development ​ ​options ​ ​in ​ ​C++. ​ ​You’ll ​ ​get ​ ​tips ​ ​on ​ ​avoiding ​ ​memory ​ ​leaks using ​ ​smart-pointers. ​ In the next module, ​ ​you’ll ​ ​see ​ ​how ​ ​multi-threaded ​programming can ​ ​help ​ ​you ​ ​achieve ​ ​concurrency ​ ​in ​ ​your ​ ​applications. We start with a brief introduction to the fundamentals of multithreading and concurrency concepts. We then take an in-depth look at how these concepts work at the hardware-level as well as how both operating systems and frameworks use these low-level functions. You will learn about the native multithreading and concurrency support available in C++ since the 2011 revision, synchronization and communication between threads, debugging concurrent C++ applications, and the best programming practices in C++. Moving ​ ​on, ​ ​you’ll ​ ​get ​ ​an ​ ​in-depth ​ ​understanding ​ ​of ​ ​the ​ ​C++ ​ ​Standard Template ​ ​Library. ​Where we show implementation-specific, problem-solution approach that will help you quickly overcome hurdles. You will learn the core STL concepts, such as containers, algorithms, utility classes, lambda expressions, iterators, and more while working on practical real-world recipes. These recipes will help you get the most from the STL and show you how to program in a better way. Jeganathan Swaminathan : Mastering C++ Programming Maya Posch : Mastering C++ Multithreading Jacek Galowicz : C++17 STL Cookbook What you will learn ​Write ​ ​modular ​ ​C++ ​ ​applications ​ ​in ​ ​terms ​ ​of ​ ​the ​ ​existing ​ ​and newly ​ ​introduced ​ ​features ​ ​Identify ​ ​code-smells, ​ ​clean ​ ​up, ​ ​and ​ ​refactor ​ ​legacy ​ ​C++ applications ​ ​Leverage ​ ​the ​ ​possibilities ​ ​provided ​ ​by ​ ​Cucumber ​ ​and ​ ​Google Test/Mock ​ ​to automate ​ ​test ​ ​cases Deep dive into the details of the how various operating systems currently implement multithreading Choose the best multithreading APIs when designing a new application Explore the use of mutexes, spin-locks, and other synchronization concepts and see how to safely pass data between threads Work with strings the STL way instead of handcrafting C-style code Understand standard support classes for concurrency and synchronization, and how to put them to work Use the filesystem library addition available with the C++17 STL Who this book is for This ​course ​is​ ​for​ ​intermediate to advanced level​ ​C++ ​developers who want to get the most out of C++ to build concurrent and scalable application.