Palindrome checker is a better basic example of test-driven development

Photo by Filip Mroz on Unsplash

A commonly given basic example for test-driven development (TDD) is a function that is supposed to add up two integers. The stub always returns a specific number, like 0, instead of actually adding up its two parameters.

Of course that fails a test that expects something like 1 + 1 = 2. So you change the stub to return 2. But now that fails a…

--

--

--

is a composer and photographer from Detroit, Michigan. He has been working on a Java program to display certain mathematical diagrams.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Sustainable Pace — The Fastest Way To Deliver Software

Introduction to Message Brokers Part 2: ActiveMQ vs. Redis Pub/Sub

Post mortem and impact summary: Tally voting bug

Running database migrations with CodePipeline and ECS

Synology: Run the latest Docker daemon without patching DSM6.x

How to Fix the “Lenovobatterygaugepackage.Dll is Missing or Not Found” Error?

Learn Golang by building a fintech banking app — Lesson2: Login and REST API

The Power of BC

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alonso Del Arte

Alonso Del Arte

is a composer and photographer from Detroit, Michigan. He has been working on a Java program to display certain mathematical diagrams.

More from Medium

Comparison Inheritance And Polymorphism in JAVA

Exception handling In Java.

What are Spring Containers and Spring Beans? What is Spring Autowiring and Dependency Injection?

SOLID Design in Practice — S: Single Responsibility Principle