dwyl / dwyl/book

Does 100% Code Coverage Mean my Code is Perfect?

Open
#21 3 comments 2 reactions 0 assignees View on GitHub
enhancement question
Dominant language
Rust
Stars
826
Forks
133
PR merge metrics
No merged PRs in 30d

Description

yes, this is a click-bait question... :wink:
_obviously_ we can write poor code and still test it and get coverage...

> insert example ...

But... we like to think of code coverage in a packaged food analogy:
Imagine you are at the "_health food store_" and you see tasty-sounding words on a new product: "Vegan, Raw, All-Natural Delicious, etc..." however, no ingredients are listed.
You ask the store assistant: "_can you tell me what is in this..._?"
she replies: "_oh, just avocado, nuts and a dash of formaldehyde_"
**_Formalda ... WHAT?**_ you exclaim as you prepare to leave the store!!
Yes, [_formaldehyde_](http://en.wikipedia.org/wiki/Formaldehyde) is a _naturally occurring organic compound_, which has been used by bad companies to extend the shelf life of "food" see: http://en.wikipedia.org/wiki/Formaldehyde#Contaminant_in_food

We (_used to_!) eat packaged foods all the time and trust the manufacturers to have our health and best interest at heart... but unless we _know_ everything that goes into those products, and the _precise_ process by which they are produced, we have _no idea_ what we are consuming!

Contributor guide

Open the contributing guide

Research direction

The issue body is the only referenced material and currently contains a placeholder, “insert example ...”, in a discussion of code coverage. Start by reviewing the full draft and its surrounding context; done would require defining the intended example and producing a complete, coherent section rather than leaving the placeholder unresolved.

Written by the indexing model from the issue text.

Assessment

Domain
content, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.