Expand on the reasoning for the post.
- Clarify 5th principle
- Clarify 12th principle
Expand on the reasoning for the post.
| Construction | Software | |
|---|---|---|
| Well understood need | Discovering the need | |
| Applying known solutions | Innovating new solutions | |
| Done when signed off | Done when replaced | |
| Value is known before delivery | Work must be delivered to have value validated | |
| Quality can be inspected | Quality is unknown without user feeddback | |
| Exspensive or impossible to change | Cheap and easy to change | |
| Detailed planning is critical | Detailed planning is waste |
| /* | |
| The following is a simple example of real outcomes from mandating code coverage | |
| minimums instead of measuring delivered quality with deploy frequency and defect rates. | |
| This test will result in 100% code coverage but tests nothing. | |
| If you find tests like these, DELETE THEM IMMEDIATLY. They provide less value than | |
| not having a test. It's better to know that this wasn't tested. | |
| */ | |
| @Test | |
| public void testMultiply() { |
| it('Should not return null of both numbers are integers' () => { | |
| /* | |
| * This call will return 4, which is not null. | |
| * Pass | |
| */ | |
| expect(addWholeNumbers(2, 2)).not.toBe(null); | |
| /* | |
| * This returns "22" because JS sees a string will helpfully concatenate them. | |
| * Pass |
| /* Return the sum of two integers */ | |
| /* Return null if one of that parms is not an integer */ | |
| function addWholeNumbers(a, b) { | |
| if (a % 1 === 0 && b % 1 === 0) { | |
| return a + b; | |
| } else { | |
| return null; | |
| } | |
| } |
| Given I have 10 dollars | |
| When I purchase a lottery ticket for 2 dollars | |
| Then I will have 8 dollars | |
| And I will get a lottery ticket | |
| And I will be congratulated for paying the mathematically challenged tax. | |
| Given I have 1 dollar | |
| When I purchase a lottery ticket for 2 dollars | |
| Then I will have 1 dollar | |
| And I will not get a lottery ticket |