Learning Test-Driven Development - Helion
ISBN: 9781098106423
stron: 280, Format: ebook
Data wydania: 2021-10-12
Księgarnia: Helion
Cena książki: 194,65 zł (poprzednio: 226,34 zł)
Oszczędzasz: 14% (-31,69 zł)
Your code is a testament to your skills as a developer. No matter what language you use, code should be clean, elegant, and uncluttered. By using test-driven development (TDD), you'll write code that's easy to understand, retains its elegance, and works for months, even years, to come. With this indispensable guide, you'll learn how to use TDD with three different languages: Go, JavaScript, and Python.
Author Saleem Siddiqui shows you how to tackle domain complexity using a unit test-driven approach. TDD partitions requirements into small, implementable features, enabling you to solve problems irrespective of the languages and frameworks you use. With Learning Test-Driven Development at your side, you'll learn how to incorporate TDD into your regular coding practice.
This book helps you:
- Use TDD's divide-and-conquer approach to tame domain complexity
- Understand how TDD works across languages, testing frameworks, and domain concepts
- Learn how TDD enables continuous integration
- Support refactoring and redesign with TDD
- Learn how to write a simple and effective unit test harness in JavaScript
- Set up a continuous integration environment with the unit tests produced during TDD
- Write clean, uncluttered code using TDD in Go, JavaScript, and Python
Osoby które kupowały "Learning Test-Driven Development", wybierały także:
- Windows Media Center. Domowe centrum rozrywki 66,67 zł, (8,00 zł -88%)
- Ruby on Rails. Ćwiczenia 18,75 zł, (3,00 zł -84%)
- Przywództwo w świecie VUCA. Jak być skutecznym liderem w niepewnym środowisku 58,64 zł, (12,90 zł -78%)
- Scrum. O zwinnym zarządzaniu projektami. Wydanie II rozszerzone 58,64 zł, (12,90 zł -78%)
- Od hierarchii do turkusu, czyli jak zarządzać w XXI wieku 58,64 zł, (12,90 zł -78%)
Spis treści
Learning Test-Driven Development eBook -- spis treści
- Foreword
- Preface
- What Is Test-Driven Development?
- A Technique
- Designing and Structuring Code
- A Bias Toward Simplicity
- Increased Confidence
- Who Is This Book For?
- What Are the Prerequisites for Reading This Book?
- How to Read This Book
- Follow the Book One Language at a Time
- Follow the Book in Two Languages First and Then in the Third Language
- Follow the Book in All Three Languages Simultaneously
- Conventions Used in This Book
- Typographical Conventions
- Lexical Conventions
- Using Code Examples
- How to Contact Us
- TDDThe Whys
- Why Does This Book Use Go, JavaScript, and Python?
- 1. Variety
- 2. Popularity
- 3. A personal reason
- Why Not This Other Language?
- Why Does This Book Have a Chapter 0?
- Why Does This Book Use Go, JavaScript, and Python?
- What Is Test-Driven Development?
- Chapter 0: Introduction and Setup
- Setting Up Your Development Environment
- Common Setup
- Folder structure
- Text editor or IDE
- Shell
- Git
- Go
- A quick word on Go package management
- JavaScript
- A quick word on testing libraries
- Another quick word, on JavaScript package management
- Python
- Common Setup
- Where We Are
- Setting Up Your Development Environment
- I. Getting Started
- 1. The Money Problem
- Red-Green-Refactor: The Building Blocks of TDD
- Whats the Problem?
- Our First Failing Test
- Go
- JavaScript
- Python
- Going for Green
- Go
- JavaScript
- Python
- Cleaning Up
- Go
- JavaScript
- Python
- Committing Our Changes
- Where We Are
- Go
- JavaScript
- Python
- 2. Multicurrency Money
- Enter the Euro
- Go
- JavaScript
- Python
- Keeping Code DRY
- Go
- JavaScript
- Python
- Didnt We Just Say Dont Repeat Yourself?!
- Divide and Conquer
- Go
- JavaScript
- Python
- Cleaning Up
- Go
- JavaScript
- Python
- Committing Our Changes
- Where We Are
- Enter the Euro
- 3. Portfolio
- Designing Our Next Test
- Go
- JavaScript
- Python
- Committing Our Changes
- Where We Are
- Designing Our Next Test
- II. Modularization
- 4. Separation of Concerns
- Test and Production Code
- Unidirectional Dependency
- Dependency Injection
- Packaging and Deployment
- Modularization
- Removing Redundancy
- Where We Are
- Test and Production Code
- 5. Packages and Modules in Go
- Separating Our Code into Packages
- Go Modules
- Creating a Package
- Encapsulation
- Removing Redundancy in Tests
- Committing Our Changes
- Where We Are
- 6. Modules in JavaScript
- Separating Our Code into Modules
- A Segue into JavaScript Modules
- CommonJS
- Asynchronous Module Definition (AMD)
- Universal Module Definition (UMD)
- ESModules
- Improving Our Tests
- Removing Redundancy in Tests
- Adding a Test Class and Test Methods
- Discovering and Running Tests Automatically
- Produce Output When Tests Run Successfully
- Run All Tests Even When an Earlier Test Assertion Fails
- Committing Our Changes
- Where We Are
- 7. Modules in Python
- Separating Our Code into Modules
- Removing Redundancy in Tests
- Committing Our Changes
- Where We Are
- III. Features and Redesign
- 8. Evaluating a Portfolio
- Mixing Money
- Go
- JavaScript
- Python
- Committing Our Changes
- Where We Are
- Mixing Money
- 9. Currencies, Currencies, Everywhere
- Making a Hash(map) of Things
- Go
- JavaScript
- Python
- Committing Our Changes
- Where We Are
- Making a Hash(map) of Things
- 10. Error Handling
- Error Wish List
- Go
- JavaScript
- Python
- Committing Our Changes
- Where We Are
- Error Wish List
- 11. Banking on Redesign
- Dependency Injection
- Putting It All Together
- Go
- JavaScript
- Python
- Committing Our Changes
- Where We Are
- IV. Finishing Up
- 12. Test Order
- Changing Exchange Rates
- Go
- JavaScript
- Python
- Committing Our Changes
- Where We Are
- Changing Exchange Rates
- 13. Continuous Integration
- Core Concepts
- Version Control
- Build Server and Agent
- Artifact Repository
- Deployment Environment
- Putting It All Together
- Create Your GitHub Account
- Verify Your GitHub Account
- Push Code Repository to GitHub
- Prepare for CI Build Scripts
- Go
- JavaScript
- Python
- Committing Our Changes
- Where We Are
- Core Concepts
- 14. Retrospective
- Profile
- Cyclomatic Complexity
- Coupling
- Succinctness
- Purpose
- Cohesion
- Completeness
- Process
- Putting It All Together
- Go
- Profile
- Purpose
- Process
- JavaScript
- Profile
- Purpose
- Process
- Python
- Profile
- Purpose
- Process
- Go
- Isnt TDD Dead?
- Where We Are
- Profile
- A. Development Environment Setup
- Online REPLs
- Repl.it
- LeetCode
- CoderPad
- The Go Playground
- The Comprehensive List of Online REPLs
- Integrated Development Environments (IDEs)
- Visual Studio Code
- IntelliJ IDEA
- Eclipse
- Installing Language Tools
- Go
- JavaScript / ES6
- Python
- Online REPLs
- B. A Brief History of the Three Languages
- Go
- JavaScript
- The assert Module
- Syntactical differences
- Simplicity
- Openness
- The Module Mechanism
- The assert Module
- Python
- C. Acknowledgments
- Index