Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

你会用TDD吗? #152

Closed
VisualStudioGayHub opened this issue Sep 18, 2022 · 3 comments
Closed

你会用TDD吗? #152

VisualStudioGayHub opened this issue Sep 18, 2022 · 3 comments

Comments

@VisualStudioGayHub
Copy link

测试代码本身也算另一种形式的业务代码,为了保证测试代码的正确。
你给测试代码写测试吗?
你给测试代码的测试代码写测试吗?
你给测试代码的测试代码的测试代码写测试吗?
你给测试代码的测试代码的测试代码的测试代码写测试吗?
你不写,就代表你不会用TDD,你就写不出高质量代码,你就无法重构代码,你就会被程序界开除人籍

@iteles
Copy link
Member

iteles commented Sep 18, 2022

As far as I can tell, both from the fact that no effort has been made to write/translate into the language that is clearly used by the community and this repo's maintainers, as well as by what comes up using Google translate, this is not a reasonable or helpful issue.

@VisualStudioGayHub Please feel free to reformulate and reopen (in English so the community can understand and help, in the case that there is actually a question here).

@iteles iteles closed this as not planned Won't fix, can't repro, duplicate, stale Sep 18, 2022
@nelsonic
Copy link
Member

nelsonic commented Sep 19, 2022

Hi @VisualStudioGayHub, 👋
Thank you for opening this issue to ask a superb question; it’s one that comes up a lot. 💭
We recognise that English is not the first language for the vast majority of people. 🇬🇧
And Google Translate translate.google.com may be blocked where you are. 😞

do-you-use-tdd

The short answer is: Yes. Absolutely! We do Test Driven Development (TDD) as much as possible. 👩‍💻

The longer answer is: Yes, we follow the TDD best practice in our day-to-day work because it is a more systematic and scientific approach to software engineering.

Skipping writing tests is like a restaurant chef not following a recipe, it can go well some of the time, but the results are inconsistent and will not scale.

image

Rough translation (care of Google Translate):

The test code itself is also another form of business code, 
in order to ensure the correctness of the test code.
Do you write tests for test code?
Do you write tests for the test code of the test code?
Do you write tests for test code for test code for test code?
Do you write tests for test code for test code for test code for test code for test code?
If you don't write it, it means you won't use TDD, you won't be able to write high-quality code, 
you won't be able to refactor the code, and you will be expelled from the programming world.

We don't tend to write tests for the tests, No.
But we do regularly write test helper functions to simplify/streamline our tests.
The purpose of the test code is to describe the "hypothesis" or desired feature we are building.
Then when the feature code makes the test pass we consider it complete.

As for the tests for test code for test code ... 🤷‍♂️ and "expelled from the programming world" :trollface: 🙄
Focus on getting really good at what you do before you propose an alternative way of doing things. 👌
Best of luck with your software engineering career. 🍀

Dupe of: mjhea0/flaskr-tdd#77, ResoCoder/flutter-tdd-clean-architecture-course#49 and gregmalcolm/python_koans#259

@nelsonic
Copy link
Member

This is very clearly a SPAM/Troll account as the same nonsense is on the profile bio:

very-clearly-spam-account

This is why we can't have nice things. 😞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants