talk-kata-and-analysis-jim

https://www.youtube.com/watch?v=ronr_CG8x0Y

This talk has some similarities to talk-therapeutic-refactoring in that he really reflects on his software development practices.


Working on Code Kata

At 14:00 he works to increase the duplication in the code.

At 36:00 (ish) he slips into exploration mode and does two things I hadn't been completely familiar with

[].methods.grep /each/

To figure out that there is an each_cons method that worked for what he was trying to do:

"XVII ".chars.each_cons(2).to_a
=> [["X", "V"], ["V", "I"], ["I", "I"], ["I", " "]]

Analysis (36:50)

At 41:00 when he makes his case for leaving in duplication

talk-kata-and-analysis-jim#favor-readability-over-dry-in-tests1 2 3 In tests, when faced with duplication vs. readability, I tend to favor readability in my tests a little bit more than I do in my production code. talk-kata-and-analysis-jim#favor-readability-over-dry-in-tests1 2 3

Questions (46:30)

48:45 He talks about how #person-zed-shaw did fuzz testing on Mongrel to ensure that Mongrel handled bad data (he used testing-concept-generative-tests for that).

talk-kata-and-analysis-jim#tdd-does-not-give-totally-complete-test-case1 When talking about why it might make sense to use generated tests (or fuzz testing) in addition to TDD, Jim said this:

"In TDD we don't try to get a totally complete test case; we try to use the test case to drive the solution and get feedback from that" talk-kata-and-analysis-jim#tdd-does-not-give-totally-complete-test-case1

talk-kata-and-analysis-jim#tdd-is-white-box-testing1 Realize that you're white box testing. TDD is not black box. You are not writing tests in ignorance of the solution. You're writing the test with full knowledge of the solution. talk-kata-and-analysis-jim#tdd-is-white-box-testing1

talk-kata-and-analysis-jim#kata-is-training-and-helps-with-discipline1 2 3 The idea of the Kata is to do it over and over again. The reason we do this... the red, green, refactor... is so that when my boss comes to me and says "Jim, I need this fixed in a day... can you get this done by this afternoon?" And I don't panic and just start writing random code, because I've got the discipline of practicing the TDD over, and over, and over again, it's actually much faster for me to fall into the good habits that I've developed by practicing the katas then to fall out of them and ignore all the good things that I know about how to develop software. That's the real purpose of the kata. talk-kata-and-analysis-jim#kata-is-training-and-helps-with-discipline1 2 3

Misc

discussion-with-kaushik-about-jim-talk

Referring Pages

testing-concept-tests-are-code-too software-concepts-dry testing-concept-red-green-refactor testing-concept-generative-tests testing-concept-white-box-testing training-and-pressure practicing-the-process-and-the-overhead talk-how-to-stop-hating-your-test-suite

People

person-jim-weirich person-zed-shaw