Skip to content

Instantly share code, notes, and snippets.

@bdfinst
bdfinst / review.md
Last active October 20, 2021 10:46
Upgrading the Agile Manifesto

Change log

2021-10-20

Expand on the reasoning for the post.

From Duena Blomstrom's blog

  • Clarify 5th principle
  • Clarify 12th principle
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
@bdfinst
bdfinst / badJavaTest.java
Last active February 8, 2021 11:48
Example of dangerous test
/*
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
@bdfinst
bdfinst / addWholeNumbers.js
Last active August 25, 2022 09:57
Adding two numbers badly
/* 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;
}
}
@bdfinst
bdfinst / example.feature
Created July 30, 2019 20:01
BDD Example
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