020 TDD破坏者

2022-10-02 21:48:4006:21 55
所属专辑:敏捷理念
声音简介

Vanilla Pop: Did you see it?Write a short test before writing the product code, everything will be perfect.

 

Joe: I do n’t know. I think that I ’m not quite comfortable with this backward wong method.

 

Vanilla: But this operation is very easy for you, right?

 

Joe: That is natural!I have learned this method from here!

 

Vanilla: (sound doesn't sound very certain) Well, let's continue to pair programming.

 

Joe: Do you know, I feel you are very worried.Moreover, I need to work alone, otherwise I will feel hurt in my self-esteem.

 

Vanilla: Okay, you said that, that's all.

 

(A little bit of time passed, and the sound of the music was accompanied by a typing keyboard knock. At the end of the day, the switch made a noise when the lights were turned off, and the door slammed shut.)

 

the next day

 

Vanilla: Let's take a look at these tests.

 

Joe: Come on!You will like these tests, I also made some adjustments.

 

Vanilla: Uh?When I clicked the test button, there was a pause, and ...

 

Joe: (Proudly speaking) A dialog box pops up!

 

Vanilla: Uh ...

Joe: Yes, this dialog will ask the user what kind of crazy parameters they want to pass to the test.In this way, I can replace your 4 tests with one test.

 

Vanilla: Ah ... Now when I test, I need to interact to--

 

Joe: Very powerful, isn't it?If you need to debug, you are all ready!

 

Vanilla: But Joe, I do n’t want to interact with the microtest.Sometimes, there will be thousands of micro-tests, and the time to interact with them is inoperable.With just one click, all micro-tests should start running.

 

Joe: (heartbroken) Oh!Understand, let me deal with it.

 

(After a period of time)

 

Vanilla: Why are there fewer tests in today ’s test run report than yesterday?

 

Joe: Some tests don't know what to do, and they keep failing, so I disabled some tests?

 

Vanilla: Wait a minute!You mean, I am increasing the test every day, and in the first few days after you started wong, you directly reduced the number of tests?

 

Joe: So, yes.Your test won't work after I adjusted the code.

 

Vanilla: Really?You should maintain the tests that have been submitted, otherwise we will have to stand still.

 

Joe: But you designed the test too inflexibly.You have to agree to use the dialog box to allow the user to manually enter the test parameters, just like I implemented before-

 

Vanilla: But Joe, each micro-test is designed for a single scenario, just a scenario.This test is simple and easy to understand, and easy to maintain.

 

Joe: So if the test fails, what do you want me to do?Open the dialog, yes the dialog is very useful!

 

Vanilla: You need to maintain the test, Joe.

 

Joe: But how do I know which part is wrong?Is it testing or my code?

 

Vanilla: The results of the test will remind you of the situation.At this time, you need to investigate and analyze, and make a judgment: whether there is a problem with your code, or whether the test needs to be updated.

 

Commentary: Vanilla Pop is letting the team members start learning TDD.The first mistake is that he did n’t let Joe pair with him.Developers trained in the education system are used to completing tasks independently.Moreover, many developers are used to spending a few hours, facing the struggle of the computer, not willing to argue and discuss with other colleagues.This is our nature.This feature is actually beneficial for learning programming.We sat in front of the computer, tossing the code alone, and kept repeating it until it became good enough to finally deliver the project successfully.

 

But there are better ways.We are no longer students, and the advantage of wong in the company is that there are many skilled developers here.The more developers work together, the quicker one's skills will be passed on to another developer with this social approach.If a new process like TDD can be implemented, it will be significantly faster.Pair programming is a good way to learn technical practice, a secret weapon.Otherwise, Vanilla Pop and junior programmer Joe rely on continuous feedback to learn, which will be much slower.

 

In the next episode, Code Dog is involved in a code coverage scandal.



用户评论

表情0/300
喵,没有找到相关结果~
暂时没有评论,下载喜马拉雅与主播互动
猜你喜欢
维特根斯坦:我破坏、我破坏、我破坏

1919年左右,刚刚过了30岁的维特根斯坦认为自己道德上是一个失败者,迫切地想改过自新。他放弃了家里留下的巨额财产,一部分分给了兄姊,并且在法律上彻底防止了自己...

by:壹咖啡

破坏

破坏朱日亮著

by:信天游啊

异世破坏神者

异乡岁晚怅离怀,世逼横泪眼未开。杀声入耳肤血骇,手绽断刃苍临海!问杀手为何叹息!叹众生不肯回头!他是一个拥有今生前世的记忆且被上天选中的人,一个XXX的传承者,...

by:煜枫84

破坏者联盟升星记

升星的斑马敬礼PK猴子警长。

by:DT_小见解说MC

诸天破坏神

【内容简介】破坏无尽世界,踏上成神之路!传统武侠,漫威世界,西方巫师,东方神邸!以破坏的名义,主宰命运!【作者/主播】作者:亡心秋,网络小说作家。主播:大壮工...

by:大壮工作室

猴子警长之破坏者联盟

破坏者联盟的第一外传一个芯片居然藏着一个天大的秘密一个小小的后空翻就引起了一场反物质的爆炸小鸡蹲蹲弗兰熊接二连三的都被绑架这件事看来没那么简单电脑键盘里的电脑病...

by:万兴讲故事2024max

暗黑破坏神DIABLO

让我们从罗格营地出发,一起探索庇护之地的故事

by:墨轩书屋

我的世界 破坏者的阴谋

回家的路上,史蒂夫突然听见了可怕的爆炸声,他的小麦农场被炸毁了,钻石剑也不见了,种种迹象表明是破坏者在捣乱,四人团队---露西、麦克斯、亨利、史蒂夫,决心找出破...

by:武子轩W