3 ms·
> we also have to agree that wishing for code without tech debt is also dignified. I think then my question is how to achieve this wish given the realities of
by tomlockwood 4y ago
> we also have to agree that wishing for code without tech debt is also dignified.
I think then my question is how to achieve this wish given the realities of the production of working code as demanded by business. Is this really a realistic wish? I am yet to work for a company that had code and didn't have technical debt. I am yet to hear of such a company.
> I think having an (inconvenient) option as a concession is a reasonable trade off.
Exactly. Perhaps these specific minitest devs ought to have called their library "i_suck_and_wrote_a_testing_framework_that_allows_writing_tests_that_are_order_dependent_and_also_its_called_minitest". :D
- Dylan16807 4y agoI find it completely unreasonable that you would blame the testing framework here. No, that line does not make sense. It does the opposite of make sense: they made a very reasonable concession and you want to call that sucking? No. While code that needs this feature really does suck.
- tomlockwood 4y agoHey! I guess they should have just written code that didn't necessitate the need for this method, in the first place! Oh well, everyone has their flaws! The question is if they need to write "I_Suck" all the time as penitence.
- djur 4y agoWhat necessitated implementing the method was that _other people_ were saying that random test order didn't work with their existing test suites (written for Test::Unit). Not only did the minitest author compromise and add this method for people unable or unwilling to fix their test suites, but he even wrote minitest-bisect to help debug ordering issues. I think this is more than enough from someone working as a volunteer on an open source project.
- Dylan16807 4y ago> Hey! I guess they should have just written code that didn't necessitate the need for this method, in the first place! They did! It's not their code that necessitates it. The only way you can say they necessitated it is by omission, as in "they didn't write the code to fill this need people have, therefore the need went unmet". But that would be nonsense because seven billion people are guilty of the same crime. No, it's the people that wrote the code under test that necessitated the need. And those people are not the minitest authors.
- tomlockwood 4y agoI think I get what you're saying! It's fine to write code that allows for and enables bad practices when it suits a pragmatic need. We therefore totally agree.
- Dylan16807 4y agoYeah! But it also helps to discourage those bad practices in the future. So when the minitest authors added this feature, they enabled the bad practices for a pragmatic need, and also did something to discourage it. On the other hand, when the people wrote those tests, they weren't writing them that way to suit a pragmatic need. They were just making a mistake. That's why the former doesn't suck, but the latter does suck. And the writers of those tests are not just enabling bad practices, they are directly performing the bad practices.
- tomlockwood 4y agoI see, so if bad practices also discourage their future usage, things are fine. So if someone writes a bad test and it makes code refactoring harder, things are fine! Perfect!
- Dylan16807 4y ago> So if someone writes a bad test and it makes code refactoring harder, things are fine! I said it's good to discourage bad practices. Unless you think refactoring is a bad practice, you have understood my comment incorrectly. But also you can remove the part about discouraging from the previous post, if it's confusing: Minitest enabled bad practices for a pragmatic reason. The tests were not following bad practices for a pragmatic reason, they did it by mistake. Enabling is less bad than doing, and minitest had a reason while the bad tests didn't. Therefore minitest doesn't suck and those tests do suck. Edit: fixed a couple typos