Dependency Manager for PHP https://getcomposer.org/
(need to step away for a few, but will check back after, keep it rollin'!)
I forget the 3rd law but, it might be refactor...
Anyway, eventually he asked the question, what is to stop someone from continuing to write really stupid code to make the tests pass?
For example, if a function needs to return 5 for a given input, you could make it look for that exact input and return 5, then the test will pass
of course that is not the correct code and the implementation would never be complete
But he actually promotes writing code like that to get the very first tests to pass.
So the principal that tells you not to keep writing stupid code to make the tests pass is this:
When changing the tests, make them more specific. When changing the code make it more generic.
The transformation priority list has some different ways you can make the code more generic in order of priority.
I think the way the list works is, if you are able to use the transformation type at the very top of the list to make the tests pass, that is ideal because it is the most generic change you can make to your code
Anyway, he really seems to be onto something with this list. He claims that if you follow this process while writing a sorting algorithm, you end up writing quicksort by accident!
So when you follow this very short circle process of the 3 laws of TDD and the priority list, programming starts to feel, really stupid.
You would expect that maybe you can write algorithms that work, but are they actually good? Are they efficient? Well it turns out they are extremetly efficient. You end up writing better algorithms than if you used a more "intelligent" approach.
@still-dreaming-1 Have you put this all into a Medium article? If not, you should!
(or if one already exists, provide the link! :P)
But by that point, Uncle Bob is getting so prescriptive with this process for writing code that, you could almost teach it to a computer program...
Thank you! Great material that deserves due consideration. That's a wrap for me, but it's been a pleasure! Looking forward to seeing you in this channel regularly!
So basically I want to try to find a way to write a function that accepts an executable contract, whatever parameters were passed in to the function being called, and then attempts various algorithms to fulfill the contract and utilize the transformation priority premise to alter its own algorithm. Once the contract has been fulfilled, it returns, and it doesn't matter if the algorithm used is "complete" or not because the contract was fullfilled.