[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.66,0:00:02.84,Default,,0000,0000,0000,,Hey, everyone. Dialogue: 0,0:00:02.88,0:00:04.96,Default,,0000,0000,0000,,I am David Heinemeier Hansson. Dialogue: 0,0:00:04.100,0:00:07.67,Default,,0000,0000,0000,,I'm here with the Martin Fowler and Kent Beck Dialogue: 0,0:00:07.74,0:00:12.71,Default,,0000,0000,0000,,to talk about "is TDD dead?" as the topic. Dialogue: 0,0:00:12.75,0:00:19.76,Default,,0000,0000,0000,,Coming off keynote I did at Rails conference and subsequent articles I posted on the blog. Dialogue: 0,0:00:19.83,0:00:23.50,Default,,0000,0000,0000,,I had chance to talk with both Kent and Martin Dialogue: 0,0:00:23.50,0:00:26.91,Default,,0000,0000,0000,,one on one in the days that followed. Dialogue: 0,0:00:26.97,0:00:30.26,Default,,0000,0000,0000,,and we got to discussed a bunch of these issues Dialogue: 0,0:00:30.29,0:00:35.65,Default,,0000,0000,0000,,and I got to clarify some thoughts and definitions that I had in my head Dialogue: 0,0:00:35.73,0:00:40.03,Default,,0000,0000,0000,,and got a lot wiser about where both Martin and Kent are on the issue Dialogue: 0,0:00:40.09,0:00:44.41,Default,,0000,0000,0000,,and Kent suggested that, "Hey. Maybe we should share that with world." Dialogue: 0,0:00:44.47,0:00:46.77,Default,,0000,0000,0000,,So that's what we're doing now. Dialogue: 0,0:00:46.82,0:00:51.97,Default,,0000,0000,0000,,I know bunch of people have been expecting to this is gonna be a big??? Dialogue: 0,0:00:52.01,0:00:53.65,Default,,0000,0000,0000,,there'll be no boxing. Dialogue: 0,0:00:53.72,0:00:59.06,Default,,0000,0000,0000,,We'll explore bunch of definitions and problems and patterns we've seen. Dialogue: 0,0:00:59.06,0:01:03.41,Default,,0000,0000,0000,,and what's work for us individually and go from there Dialogue: 0,0:01:03.46,0:01:06.63,Default,,0000,0000,0000,,But to get started, I thought Dialogue: 0,0:01:06.71,0:01:11.01,Default,,0000,0000,0000,,I just run over brief recap of the problems that I've seen with TDD Dialogue: 0,0:01:11.11,0:01:13.63,Default,,0000,0000,0000,,use that to kick off the discussion Dialogue: 0,0:01:13.68,0:01:19.36,Default,,0000,0000,0000,,and really three major points that all focus on this discussion. Dialogue: 0,0:01:19.36,0:01:24.07,Default,,0000,0000,0000,,The first is the definition of TDD and its components Dialogue: 0,0:01:24.13,0:01:26.44,Default,,0000,0000,0000,,specifically unit testing. Dialogue: 0,0:01:26.52,0:01:30.39,Default,,0000,0000,0000,,I know the TDD and unit testing are certainly not the same thing Dialogue: 0,0:01:30.45,0:01:34.44,Default,,0000,0000,0000,,but TDD's often used to drive unit test Dialogue: 0,0:01:34.47,0:01:37.18,Default,,0000,0000,0000,,and as I was looking through Dialogue: 0,0:01:37.23,0:01:41.33,Default,,0000,0000,0000,,issues I've been in the Rails world around TDD Dialogue: 0,0:01:41.38,0:01:44.27,Default,,0000,0000,0000,,a lot of that came down to the definition of unit testing. Dialogue: 0,0:01:44.33,0:01:46.92,Default,,0000,0000,0000,,that people were defining unit testing as Dialogue: 0,0:01:46.96,0:01:49.71,Default,,0000,0000,0000,,you can't have collaborators Dialogue: 0,0:01:49.77,0:01:51.33,Default,,0000,0000,0000,,you can't touch the databases Dialogue: 0,0:01:51.38,0:01:52.77,Default,,0000,0000,0000,,you can't touch the filesystem Dialogue: 0,0:01:52.77,0:02:01.42,Default,,0000,0000,0000,,goal was to have a suite of unit tests so fast that they could complete in a blink of an eye. Dialogue: 0,0:02:01.49,0:02:03.13,Default,,0000,0000,0000,,I've seen arguments of Dialogue: 0,0:02:03.17,0:02:07.63,Default,,0000,0000,0000,,if it takes more than 300 milliseconds to complete the entire suite then it's way too slow. Dialogue: 0,0:02:07.67,0:02:08.63,Default,,0000,0000,0000,,I can't use it for anything. Dialogue: 0,0:02:08.69,0:02:13.80,Default,,0000,0000,0000,,and that just wasn't matching my useful definition of unit testing Dialogue: 0,0:02:13.80,0:02:16.89,Default,,0000,0000,0000,,and it wasn't matching what I was trying to get out of it. Dialogue: 0,0:02:16.96,0:02:22.66,Default,,0000,0000,0000,,and frankly I wasn't get anything useful out of unit tests that weren't talking to any collaborators. Dialogue: 0,0:02:22.72,0:02:29.19,Default,,0000,0000,0000,,Second, which follows from that is driving your architecture through Mocks. Dialogue: 0,0:02:29.26,0:02:33.81,Default,,0000,0000,0000,,If you want everything in your test suite to be so super fast Dialogue: 0,0:02:33.90,0:02:36.62,Default,,0000,0000,0000,,well obviously you have to talk to mocks Dialogue: 0,0:02:36.68,0:02:38.18,Default,,0000,0000,0000,,you can't talk to anything slow Dialogue: 0,0:02:38.18,0:02:40.71,Default,,0000,0000,0000,,and you can't talk to many layers at once Dialogue: 0,0:02:40.79,0:02:47.27,Default,,0000,0000,0000,,which leads to a mock sort of heavy and enabling architecture Dialogue: 0,0:02:47.33,0:02:51.86,Default,,0000,0000,0000,,repositories and hexagonal pattrerns Dialogue: 0,0:02:51.86,0:02:56.87,Default,,0000,0000,0000,,and all these other things that makes very easy to stuff and mock your way out of everything Dialogue: 0,0:02:56.95,0:03:00.59,Default,,0000,0000,0000,,and turn every test you could imagine into unit tests Dialogue: 0,0:03:00.65,0:03:03.48,Default,,0000,0000,0000,,MVC framework as I work with rails Dialogue: 0,0:03:03.54,0:03:08.61,Default,,0000,0000,0000,,the controller, "Oh, no problem. Just stuff out everything talking to the view" Dialogue: 0,0:03:08.65,0:03:12.81,Default,,0000,0000,0000,,"talking to the model and then that's gonna be great." Dialogue: 0,0:03:12.86,0:03:15.94,Default,,0000,0000,0000,,I was not seeing that being very great at all Dialogue: 0,0:03:15.100,0:03:19.50,Default,,0000,0000,0000,,the key point what I thought Dialogue: 0,0:03:19.56,0:03:22.06,Default,,0000,0000,0000,,this is test induced damage Dialogue: 0,0:03:22.16,0:03:30.21,Default,,0000,0000,0000,,that the architect is actually suffering damage from this drive towards unit testing all the things Dialogue: 0,0:03:30.26,0:03:35.67,Default,,0000,0000,0000,,and that the unit testing all the things is coming through the TDD pipe. Dialogue: 0,0:03:35.75,0:03:41.15,Default,,0000,0000,0000,,And then finally this sort of ..... TDD Dialogue: 0,0:03:41.24,0:03:43.20,Default,,0000,0000,0000,,is the read green refactor loop. Dialogue: 0,0:03:43.27,0:03:47.09,Default,,0000,0000,0000,,And that was more of, sort of personal thing. Dialogue: 0,0:03:47.14,0:03:51.85,Default,,0000,0000,0000,,We can all have our own personal preferences and how we develop things Dialogue: 0,0:03:51.94,0:03:57.56,Default,,0000,0000,0000,,in TDD red-green refactor seemed .... more of mandate Dialogue: 0,0:03:57.65,0:04:03.63,Default,,0000,0000,0000,,I never dealt with that for the bulk of the work that I do Dialogue: 0,0:04:03.71,0:04:08.05,Default,,0000,0000,0000,,at certain locations at work and at certain locations that flow was good Dialogue: 0,0:04:08.11,0:04:12.73,Default,,0000,0000,0000,,but I felt like there there's tons of code that I was writing were red green refactor Dialogue: 0,0:04:12.79,0:04:14.61,Default,,0000,0000,0000,,just not an enjoyable of way to do it. Dialogue: 0,0:04:14.66,0:04:18.29,Default,,0000,0000,0000,,and I didn't feel like I was going to a better place by going through that Dialogue: 0,0:04:18.32,0:04:24.79,Default,,0000,0000,0000,,So those sort of the three top-line problems that I think with the TDD Dialogue: 0,0:04:24.86,0:04:27.48,Default,,0000,0000,0000,,Let's sort of the open conversation up Dialogue: 0,0:04:27.52,0:04:33.97,Default,,0000,0000,0000,,and have Martin and Kent chime in perhaps one at a time Dialogue: 0,0:04:33.97,0:04:36.13,Default,,0000,0000,0000,,What is unit test? Dialogue: 0,0:04:36.20,0:04:38.63,Default,,0000,0000,0000,,What's useful definition of unit test? Dialogue: 0,0:04:38.70,0:04:43.90,Default,,0000,0000,0000,,What's useful definition of unit test and how most people currently defining it in you guys' view. Dialogue: 0,0:04:43.96,0:04:46.63,Default,,0000,0000,0000,,Well, I propose Dialogue: 0,0:04:46.63,0:04:48.92,Default,,0000,0000,0000,,in order to understand something Dialogue: 0,0:04:48.98,0:04:51.51,Default,,0000,0000,0000,,I often find it useful to know how it came about. Dialogue: 0,0:04:51.60,0:04:57.90,Default,,0000,0000,0000,,And the style of unit testing we familiar with is basically all Kent's fault. Dialogue: 0,0:04:57.96,0:05:02.59,Default,,0000,0000,0000,,Right? Because Kent did the framework, XUnit frameworks Dialogue: 0,0:05:02.66,0:05:05.38,Default,,0000,0000,0000,,whole push through extreme programming Dialogue: 0,0:05:05.38,0:05:07.36,Default,,0000,0000,0000,,so maybe we start with that Dialogue: 0,0:05:07.36,0:05:11.11,Default,,0000,0000,0000,,where those source of this style of unit testing come from. Dialogue: 0,0:05:11.19,0:05:13.62,Default,,0000,0000,0000,,You're the guy. You explain it. Dialogue: 0,0:05:13.66,0:05:20.42,Default,,0000,0000,0000,,Can you hear me? Dialogue: 0,0:05:20.46,0:05:22.97,Default,,0000,0000,0000,,Yep. Dialogue: 0,0:05:23.04,0:05:31.35,Default,,0000,0000,0000,,So when I was a kid Dialogue: 0,0:05:31.45,0:05:33.26,Default,,0000,0000,0000,,I would read books about programming Dialogue: 0,0:05:33.32,0:05:35.06,Default,,0000,0000,0000,,I was just fascinated by programming. Dialogue: 0,0:05:35.13,0:05:38.10,Default,,0000,0000,0000,,I'm talking about nine, ten, eleven years old Dialogue: 0,0:05:38.14,0:05:39.88,Default,,0000,0000,0000,,and my dad was a programmer Dialogue: 0,0:05:39.88,0:05:42.08,Default,,0000,0000,0000,,so there're lots of books about programming around. Dialogue: 0,0:05:42.14,0:05:48.29,Default,,0000,0000,0000,,And he had a book and I would read I didn't understand anything Dialogue: 0,0:05:48.35,0:05:52.52,Default,,0000,0000,0000,,but I was just sorta compulsively reading these books Dialogue: 0,0:05:52.59,0:05:54.61,Default,,0000,0000,0000,,cause I found the whole topics fascinating Dialogue: 0,0:05:54.61,0:05:59.07,Default,,0000,0000,0000,,there was a book that said, "Here's how you program." Dialogue: 0,0:05:59.16,0:06:05.28,Default,,0000,0000,0000,,"You type in the output tape that you expect your program to produce given some input tape" Dialogue: 0,0:06:05.35,0:06:12.82,Default,,0000,0000,0000,,"And in programming is, you just write program and tell it produces the output tape that you expected." Dialogue: 0,0:06:12.87,0:06:18.93,Default,,0000,0000,0000,,So that was kind of fixed way back in my brain as the flow of programming. Dialogue: 0,0:06:19.01,0:06:24.79,Default,,0000,0000,0000,,And it wasn't until after I had been testing for a while Dialogue: 0,0:06:24.83,0:06:31.32,Default,,0000,0000,0000,,that already come up with the first version of SUnit, the Smalltalk testing framework Dialogue: 0,0:06:31.40,0:06:33.02,Default,,0000,0000,0000,,that was the precursor to JUnit. Dialogue: 0,0:06:33.06,0:06:40.66,Default,,0000,0000,0000,,and I remember this idea of writing the test before writing the code Dialogue: 0,0:06:40.66,0:06:41.82,Default,,0000,0000,0000,,which makes no sense, right? Dialogue: 0,0:06:41.82,0:06:44.79,Default,,0000,0000,0000,,the test is gonna fail and you want the test succeed. Dialogue: 0,0:06:44.79,0:06:48.90,Default,,0000,0000,0000,,so why would you write it when you knew it was gonna fail? Dialogue: 0,0:06:48.90,0:06:50.99,Default,,0000,0000,0000,,So I just tried it. Dialogue: 0,0:06:50.99,0:06:59.04,Default,,0000,0000,0000,,One of my heuristics is, "If an idea is obviously bad, find the cheap way to try it Dialogue: 0,0:06:59.04,0:07:02.85,Default,,0000,0000,0000,,because if it turns out it's not bad then it's really interesting Dialogue: 0,0:07:02.85,0:07:04.98,Default,,0000,0000,0000,,if you have a good idea and it's obviously good Dialogue: 0,0:07:05.04,0:07:08.38,Default,,0000,0000,0000,,somebody else's probably tried it before. Dialogue: 0,0:07:08.42,0:07:12.85,Default,,0000,0000,0000,,So, I just figured I'd try and I think I built stack at first time. Dialogue: 0,0:07:12.94,0:07:16.27,Default,,0000,0000,0000,,and it worked really really for me. Dialogue: 0,0:07:16.27,0:07:26.45,Default,,0000,0000,0000,,i think there's aspects of my personality that make this kind of peicemeal style work really well Dialogue: 0,0:07:26.61,0:07:33.33,Default,,0000,0000,0000,,I have a lot of anxiety and I tend to get overwhelmed by big problems Dialogue: 0,0:07:33.33,0:07:37.71,Default,,0000,0000,0000,,and for me TDD solves those problems. Dialogue: 0,0:07:37.71,0:07:43.92,Default,,0000,0000,0000,,Even if I don't know how to implement something I can almost always figure out how to wright tests for it Dialogue: 0,0:07:44.00,0:07:49.64,Default,,0000,0000,0000,,and if I can't figure out how to write a test for it, I have no business in programming in the first places. Dialogue: 0,0:07:49.76,0:07:54.25,Default,,0000,0000,0000,,So, that's how got into it. Dialogue: 0,0:07:54.25,0:07:57.54,Default,,0000,0000,0000,,And it was definitely ground up Dialogue: 0,0:07:57.59,0:08:04.98,Default,,0000,0000,0000,,that is, I started with small green problems and gradually work my way to larger green problem." Dialogue: 0,0:08:04.98,0:08:08.55,Default,,0000,0000,0000,,Go ahead. Dialogue: 0,0:08:08.59,0:08:13.52,Default,,0000,0000,0000,,I was thinking about this on reflecting back on our early days together Dialogue: 0,0:08:13.68,0:08:18.52,Default,,0000,0000,0000,,and if I recall correctly when we began working Dialogue: 0,0:08:18.52,0:08:22.34,Default,,0000,0000,0000,,??? using extreme programming ??? Dialogue: 0,0:08:22.34,0:08:25.49,Default,,0000,0000,0000,,we did the testing very strongly from the beginning Dialogue: 0,0:08:25.55,0:08:27.23,Default,,0000,0000,0000,,but it wasn't test first at beginning. Dialogue: 0,0:08:27.30,0:08:30.87,Default,,0000,0000,0000,,I've got this memory of you standing up and saying Dialogue: 0,0:08:30.94,0:08:37.26,Default,,0000,0000,0000,,"The stories are not done until the codes're written and the tests're written and the tests are passing. Dialogue: 0,0:08:37.31,0:08:40.72,Default,,0000,0000,0000,,So we have the notion that you delivered at the end of it Dialogue: 0,0:08:40.82,0:08:43.27,Default,,0000,0000,0000,,increment of functionality with code and tests together Dialogue: 0,0:08:43.36,0:08:46.40,Default,,0000,0000,0000,,but test first didn't actually followed till later. Dialogue: 0,0:08:46.48,0:08:52.70,Default,,0000,0000,0000,,I can't remember when that came because it seemed gradually appeared. Dialogue: 0,0:08:52.79,0:08:57.82,Default,,0000,0000,0000,,but I feel that at that very beginning the focus was on the tests. Dialogue: 0,0:08:57.90,0:09:00.11,Default,,0000,0000,0000,,on the tests with that but that's the first as it were Dialogue: 0,0:09:00.21,0:09:06.30,Default,,0000,0000,0000,,so I think one of the fundamental question is Dialogue: 0,0:09:06.34,0:09:10.21,Default,,0000,0000,0000,,as a programmer do you deserve to feel confident? Dialogue: 0,0:09:10.25,0:09:17.83,Default,,0000,0000,0000,,I certainly grew up in culture that didn't encourage that. Dialogue: 0,0:09:17.88,0:09:21.15,Default,,0000,0000,0000,,You know, you write some stuff and just hope it works Dialogue: 0,0:09:21.19,0:09:23.49,Default,,0000,0000,0000,,somebody else would tell you whether they thought it worked. Dialogue: 0,0:09:23.56,0:09:29.21,Default,,0000,0000,0000,,and you go home on Friday and just think Dialogue: 0,0:09:29.24,0:09:31.06,Default,,0000,0000,0000,,"Oh god. I just hope I didn't break something." Dialogue: 0,0:09:31.11,0:09:37.67,Default,,0000,0000,0000,,and so I think the going a step back from TDD or automated testing Dialogue: 0,0:09:37.70,0:09:40.50,Default,,0000,0000,0000,,"do you deserve to feel the confidence?" Dialogue: 0,0:09:40.50,0:09:41.55,Default,,0000,0000,0000,,"can you sleep at night?" Dialogue: 0,0:09:41.61,0:09:44.50,Default,,0000,0000,0000,,knowing that your code works Dialogue: 0,0:09:44.55,0:09:46.88,Default,,0000,0000,0000,,I think the answer should be Yes for programmer. Dialogue: 0,0:09:46.98,0:09:50.82,Default,,0000,0000,0000,,So if we agree on that then we can talk about how to achieve that. Dialogue: 0,0:09:50.82,0:09:53.43,Default,,0000,0000,0000,,TDD is one way to achieve that. Dialogue: 0,0:09:53.43,0:09:55.08,Default,,0000,0000,0000,,There's lots of other ways. Dialogue: 0,0:09:55.14,0:09:58.74,Default,,0000,0000,0000,,I think that it's a great point because Dialogue: 0,0:09:58.74,0:10:01.54,Default,,0000,0000,0000,,one of the things that really got me into programming was Dialogue: 0,0:10:01.63,0:10:03.38,Default,,0000,0000,0000,,was Ruby. Dialogue: 0,0:10:03.48,0:10:05.100,Default,,0000,0000,0000,,Right. So I've been programming before Ruby but Dialogue: 0,0:10:06.03,0:10:12.07,Default,,0000,0000,0000,,this language that has a very specific mission statement. Dialogue: 0,0:10:12.07,0:10:14.02,Default,,0000,0000,0000,,Programmer Happiness Dialogue: 0,0:10:14.02,0:10:16.79,Default,,0000,0000,0000,,Right. So I think those two are related Dialogue: 0,0:10:16.87,0:10:23.10,Default,,0000,0000,0000,,the programmer happiness is certainly related to feeling confident in your code Dialogue: 0,0:10:23.10,0:10:24.90,Default,,0000,0000,0000,,and confident in making changes to it Dialogue: 0,0:10:24.90,0:10:26.53,Default,,0000,0000,0000,,and confident that's going to work Dialogue: 0,0:10:26.53,0:10:28.55,Default,,0000,0000,0000,,But it's only one part of that picture Dialogue: 0,0:10:28.66,0:10:32.46,Default,,0000,0000,0000,,and early days Martin described were Dialogue: 0,0:10:32.46,0:10:36.53,Default,,0000,0000,0000,,"Oh. You're not done until you also have tests for piece of functionality. Dialogue: 0,0:10:36.53,0:10:38.25,Default,,0000,0000,0000,,I'm completely on board with that. Right? Dialogue: 0,0:10:38.27,0:10:40.43,Default,,0000,0000,0000,,Where I'm not on board is that Dialogue: 0,0:10:40.68,0:10:45.48,Default,,0000,0000,0000,,that whole feeling of feeling great about your development style Dialogue: 0,0:10:45.48,0:10:48.83,Default,,0000,0000,0000,,feeling programmer happiness as Matz would always put it. Dialogue: 0,0:10:48.83,0:10:52.75,Default,,0000,0000,0000,,Just I wasn't getting that from TDD, right? Dialogue: 0,0:10:52.75,0:10:56.11,Default,,0000,0000,0000,,So maybe that's some of the patterns we talked about Dialogue: 0,0:10:56.14,0:10:59.79,Default,,0000,0000,0000,,different people with different brain style, right? Dialogue: 0,0:10:59.79,0:11:02.33,Default,,0000,0000,0000,,Why do some people enjoy Python? Dialogue: 0,0:11:02.33,0:11:03.83,Default,,0000,0000,0000,,Why do some people enjoy Ruby? Dialogue: 0,0:11:03.83,0:11:08.93,Default,,0000,0000,0000,,and even harder for me to comprehend how some people enjoy Java. Dialogue: 0,0:11:09.02,0:11:13.27,Default,,0000,0000,0000,,But but we sort of have different ways of looking at things Dialogue: 0,0:11:13.27,0:11:14.66,Default,,0000,0000,0000,,and feeling good about them. Dialogue: 0,0:11:14.66,0:11:19.13,Default,,0000,0000,0000,,and what I was finding just from the red green refactor flow Dialogue: 0,0:11:19.22,0:11:22.98,Default,,0000,0000,0000,,was that the whole notion of writing to test first and seeing that fail Dialogue: 0,0:11:22.98,0:11:25.75,Default,,0000,0000,0000,,and doing that for every piece of code before I move forward Dialogue: 0,0:11:25.75,0:11:28.89,Default,,0000,0000,0000,,was just not natural Dialogue: 0,0:11:28.89,0:11:31.90,Default,,0000,0000,0000,,because a natural you can overcome just by familiarity Dialogue: 0,0:11:31.90,0:11:37.60,Default,,0000,0000,0000,,but even through familiarity it was just not a pleasurable flow Dialogue: 0,0:11:37.60,0:11:43.74,Default,,0000,0000,0000,,and I think that's where a lot of the explosive debate comes from Dialogue: 0,0:11:43.74,0:11:51.53,Default,,0000,0000,0000,,to some people writing your thesis first and filling in the implementation with that works really well. Dialogue: 0,0:11:51.57,0:11:52.99,Default,,0000,0000,0000,,That's exactly how their brain operates Dialogue: 0,0:11:53.10,0:11:56.92,Default,,0000,0000,0000,,For other people, me included, it doesn't work like that. Dialogue: 0,0:11:56.96,0:12:01.82,Default,,0000,0000,0000,,It's much more tactile experience that I actually have to sit in and write it out Dialogue: 0,0:12:01.90,0:12:03.29,Default,,0000,0000,0000,,that's how I think through it Dialogue: 0,0:12:03.29,0:12:09.38,Default,,0000,0000,0000,,I don't think through it by proposing hypothesis up first and then try to fill it in. Dialogue: 0,0:12:09.38,0:12:11.51,Default,,0000,0000,0000,,I think through it by writing it out Dialogue: 0,0:12:11.51,0:12:17.81,Default,,0000,0000,0000,,If I can't write test first I have no business writing it. Dialogue: 0,0:12:17.84,0:12:22.70,Default,,0000,0000,0000,,That's I totally understand how that you can arrived at Dialogue: 0,0:12:22.78,0:12:24.89,Default,,0000,0000,0000,,It's just not at all how I feel about it. Dialogue: 0,0:12:24.89,0:12:29.68,Default,,0000,0000,0000,,I have a hard time writing a test forward, if I don't see it first, right? Dialogue: 0,0:12:29.68,0:12:33.13,Default,,0000,0000,0000,,SO you have sort of these some people like it from Dialogue: 0,0:12:33.19,0:12:35.66,Default,,0000,0000,0000,,going through the test Dialogue: 0,0:12:35.66,0:12:37.66,Default,,0000,0000,0000,,and other people like going to the test. Dialogue: 0,0:12:37.76,0:12:39.08,Default,,0000,0000,0000,,I think . Dialogue: 0,0:12:39.15,0:12:42.44,Default,,0000,0000,0000,,certainly important to realize we're both getting to same place Dialogue: 0,0:12:42.44,0:12:45.19,Default,,0000,0000,0000,,getting to fell confident about the code Dialogue: 0,0:12:45.27,0:12:47.45,Default,,0000,0000,0000,,confident making the changes to the code Dialogue: 0,0:12:47.53,0:12:52.61,Default,,0000,0000,0000,,that's the part I'm not a fan of tying these two things together Dialogue: 0,0:12:52.61,0:12:53.54,Default,,0000,0000,0000,,I'm not a fan of tying Dialogue: 0,0:12:53.54,0:12:56.88,Default,,0000,0000,0000,,oh you just have to be confident to TDD Dialogue: 0,0:12:56.94,0:12:59.39,Default,,0000,0000,0000,,which, I know you're not doing, right? Dialogue: 0,0:12:59.46,0:13:01.72,Default,,0000,0000,0000,,TDD is one path of getting to that place Dialogue: 0,0:13:01.78,0:13:05.17,Default,,0000,0000,0000,,I've seen there're a lot of people are mistaken those two things Dialogue: 0,0:13:05.23,0:13:07.34,Default,,0000,0000,0000,,that you can't have confidence Dialogue: 0,0:13:07.34,0:13:10.06,Default,,0000,0000,0000,,you can't deliver incremental functionality with test Dialogue: 0,0:13:10.16,0:13:15.63,Default,,0000,0000,0000,,unless you go through this mandated well paid road of TDD Dialogue: 0,0:13:15.63,0:13:21.97,Default,,0000,0000,0000,,so, last night was hackathon at Facebook Dialogue: 0,0:13:21.97,0:13:28.88,Default,,0000,0000,0000,,and I have a project on a internal tool that I was working on. Dialogue: 0,0:13:28.95,0:13:32.85,Default,,0000,0000,0000,,and half of it I could use TDD for Dialogue: 0,0:13:32.91,0:13:34.29,Default,,0000,0000,0000,,and half of it I couldn't Dialogue: 0,0:13:34.35,0:13:37.67,Default,,0000,0000,0000,,so I had a big log that I wanted to process Dialogue: 0,0:13:37.78,0:13:43.60,Default,,0000,0000,0000,,and the entries in the log were not clearly specified anywhere Dialogue: 0,0:13:43.70,0:13:46.72,Default,,0000,0000,0000,,but I wanted to put them into a data structure Dialogue: 0,0:13:46.72,0:13:51.63,Default,,0000,0000,0000,,kind of funky new data structure Dialogue: 0,0:13:51.63,0:13:56.36,Default,,0000,0000,0000,,the data structure I could build with TDD is just fine Dialogue: 0,0:13:56.36,0:13:59.28,Default,,0000,0000,0000,,because I could break it down Dialogue: 0,0:13:59.39,0:14:02.32,Default,,0000,0000,0000,,ok, here's the main case Dialogue: 0,0:14:02.32,0:14:03.35,Default,,0000,0000,0000,,here's the corner cases Dialogue: 0,0:14:03.41,0:14:05.70,Default,,0000,0000,0000,,here's how I go from one to many Dialogue: 0,0:14:05.77,0:14:08.29,Default,,0000,0000,0000,,just nice sequence of tests Dialogue: 0,0:14:08.38,0:14:13.31,Default,,0000,0000,0000,,and I can get into real flow Dialogue: 0,0:14:13.31,0:14:16.68,Default,,0000,0000,0000,,just make one test work and the next one and the next one Dialogue: 0,0:14:16.68,0:14:19.23,Default,,0000,0000,0000,,so that feels a certain way to me Dialogue: 0,0:14:19.31,0:14:22.98,Default,,0000,0000,0000,,when I had to fiddle live data into it Dialogue: 0,0:14:23.09,0:14:25.27,Default,,0000,0000,0000,,it feels very different way Dialogue: 0,0:14:25.27,0:14:28.25,Default,,0000,0000,0000,,because I don't have that clear specification Dialogue: 0,0:14:28.35,0:14:32.51,Default,,0000,0000,0000,,I just have to run a few million log entries through this first Dialogue: 0,0:14:32.51,0:14:34.14,Default,,0000,0000,0000,,and see what blows up Dialogue: 0,0:14:34.14,0:14:36.77,Default,,0000,0000,0000,,so I put in logging Dialogue: 0,0:14:36.83,0:14:39.71,Default,,0000,0000,0000,,I put in exception handling Dialogue: 0,0:14:39.77,0:14:44.68,Default,,0000,0000,0000,,so any log entry that's kind of funky that isn't handle by the code Dialogue: 0,0:14:44.68,0:14:47.37,Default,,0000,0000,0000,,get saved some place Dialogue: 0,0:14:47.37,0:14:53.53,Default,,0000,0000,0000,,then I can't go back and look at those entries that I can't handle yet Dialogue: 0,0:14:53.60,0:14:56.28,Default,,0000,0000,0000,,and I can use them Dialogue: 0,0:14:56.36,0:14:58.87,Default,,0000,0000,0000,,but I can't write a test for it Dialogue: 0,0:14:58.87,0:15:01.17,Default,,0000,0000,0000,,because I don't even know what the inputs look like Dialogue: 0,0:15:01.17,0:15:03.55,Default,,0000,0000,0000,,and that feels different way to me Dialogue: 0,0:15:03.55,0:15:08.80,Default,,0000,0000,0000,,so with the parts of the code that I can use TDD for Dialogue: 0,0:15:08.90,0:15:10.44,Default,,0000,0000,0000,,I mean a real flow Dialogue: 0,0:15:10.53,0:15:11.89,Default,,0000,0000,0000,,write a test, make it work Dialogue: 0,0:15:11.89,0:15:12.78,Default,,0000,0000,0000,,write a test, make it work Dialogue: 0,0:15:12.78,0:15:14.65,Default,,0000,0000,0000,,??? 12:30 Dialogue: 0,0:15:14.65,0:15:17.32,Default,,0000,0000,0000,,I really like that feeling Dialogue: 0,0:15:17.40,0:15:23.38,Default,,0000,0000,0000,,the ones where I have to run on live ??? Dialogue: 0,0:15:23.49,0:15:24.32,Default,,0000,0000,0000,,see what happens Dialogue: 0,0:15:24.32,0:15:26.82,Default,,0000,0000,0000,,I fee a lot more anxiety Dialogue: 0,0:15:26.92,0:15:31.24,Default,,0000,0000,0000,,but you know it's called work for reason Dialogue: 0,0:15:31.24,0:15:37.39,Default,,0000,0000,0000,,so I'm going to use the principles of double checking of regression testing Dialogue: 0,0:15:37.46,0:15:39.40,Default,,0000,0000,0000,,of short feedback loops Dialogue: 0,0:15:39.40,0:15:43.04,Default,,0000,0000,0000,,and try to get the shortest possible feedback loop Dialogue: 0,0:15:43.04,0:15:46.38,Default,,0000,0000,0000,,out of this unpredictable input that I'm getting Dialogue: 0,0:15:46.38,0:15:50.77,Default,,0000,0000,0000,,so I had to mix the two styles in one night Dialogue: 0,0:15:50.77,0:15:52.37,Default,,0000,0000,0000,,and it doesn't bother me Dialogue: 0,0:15:52.37,0:15:59.17,Default,,0000,0000,0000,,if I can play classical and jazz then I'm in a better position to make music for more people Dialogue: 0,0:15:59.23,0:16:05.04,Default,,0000,0000,0000,,but when I can reduce a problem to this sequence of tests Dialogue: 0,0:16:05.04,0:16:08.32,Default,,0000,0000,0000,,drive the solution from this sequence of test Dialogue: 0,0:16:08.38,0:16:10.55,Default,,0000,0000,0000,,it has special kind of feeling Dialogue: 0,0:16:10.62,0:16:12.21,Default,,0000,0000,0000,,for me it works really well Dialogue: 0,0:16:12.21,0:16:15.50,Default,,0000,0000,0000,,if I think back to how learned a ??? map Dialogue: 0,0:16:15.57,0:16:17.10,Default,,0000,0000,0000,,I always used these examples Dialogue: 0,0:16:17.18,0:16:19.90,Default,,0000,0000,0000,,you know there'd be some general Dialogue: 0,0:16:19.90,0:16:22.68,Default,,0000,0000,0000,,you know, prove this statement Dialogue: 0,0:16:22.78,0:16:26.53,Default,,0000,0000,0000,,and I think well, "what's an example of that" Dialogue: 0,0:16:26.62,0:16:28.68,Default,,0000,0000,0000,,and then I come up with a few examples Dialogue: 0,0:16:28.82,0:16:31.61,Default,,0000,0000,0000,,and I convince myself either the statement was true or that wasn't Dialogue: 0,0:16:31.68,0:16:33.21,Default,,0000,0000,0000,,and then I can write the proof Dialogue: 0,0:16:33.27,0:16:35.50,Default,,0000,0000,0000,,but that's my personal flow Dialogue: 0,0:16:35.59,0:16:38.64,Default,,0000,0000,0000,,I work from specific to general Dialogue: 0,0:16:38.64,0:16:40.36,Default,,0000,0000,0000,,this kind of inductive style Dialogue: 0,0:16:40.44,0:16:42.91,Default,,0000,0000,0000,,and I understand not everybody likes that Dialogue: 0,0:16:42.91,0:16:44.98,Default,,0000,0000,0000,,what I think is interesting though Dialogue: 0,0:16:45.06,0:16:47.53,Default,,0000,0000,0000,,even if I've been in that flow too Dialogue: 0,0:16:47.59,0:16:51.35,Default,,0000,0000,0000,,I had been in flow where TDD was working our well for me Dialogue: 0,0:16:51.44,0:16:53.71,Default,,0000,0000,0000,,it was ??? I should describe ??? Dialogue: 0,0:16:53.77,0:16:55.25,Default,,0000,0000,0000,,it was very clear input Dialogue: 0,0:16:55.34,0:16:56.86,Default,,0000,0000,0000,,and was very clear desired output Dialogue: 0,0:16:56.86,0:16:59.76,Default,,0000,0000,0000,,and there were not a lot of contacts?? Dialogue: 0,0:16:59.84,0:17:01.91,Default,,0000,0000,0000,,and there was not a lot of environment Dialogue: 0,0:17:01.97,0:17:03.62,Default,,0000,0000,0000,,to operate it Dialogue: 0,0:17:03.62,0:17:05.18,Default,,0000,0000,0000,,it was very pure Dialogue: 0,0:17:05.18,0:17:07.64,Default,,0000,0000,0000,,and for that Dialogue: 0,0:17:07.72,0:17:12.36,Default,,0000,0000,0000,,that would probably one case where I do actually like that flow Dialogue: 0,0:17:12.36,0:17:16.16,Default,,0000,0000,0000,,what I find is a lot of my work is not like that Dialogue: 0,0:17:16.23,0:17:21.07,Default,,0000,0000,0000,,right? sort of fundamentally maybe not like that Dialogue: 0,0:17:21.07,0:17:26.35,Default,,0000,0000,0000,,and then the problem comes in what am I willing to sacrifice to get that Dialogue: 0,0:17:26.35,0:17:29.34,Default,,0000,0000,0000,,you can reduce any type of work Dialogue: 0,0:17:29.41,0:17:31.91,Default,,0000,0000,0000,,certainly in the web space ???if you doing to that flow Dialogue: 0,0:17:32.01,0:17:35.32,Default,,0000,0000,0000,,if you just, that's where the whole mocking thing comes in, right? Dialogue: 0,0:17:35.39,0:17:38.83,Default,,0000,0000,0000,,if you just find a way and work hard enough Dialogue: 0,0:17:38.91,0:17:41.53,Default,,0000,0000,0000,,you can remove all the sort of dependencies Dialogue: 0,0:17:41.53,0:17:45.83,Default,,0000,0000,0000,,all the environment and reduce it to just one piece of input and one piece of output Dialogue: 0,0:17:45.83,0:17:53.21,Default,,0000,0000,0000,,is the flow important enough that you want to do that as general case? Dialogue: 0,0:17:53.28,0:17:58.21,Default,,0000,0000,0000,,how much you willing to sacrifice to be in that flow more ???you work Dialogue: 0,0:17:58.21,0:18:00.64,Default,,0000,0000,0000,,for me the answer has been Dialogue: 0,0:18:00.72,0:18:03.07,Default,,0000,0000,0000,,"I'm not willing to sacrifice that much." Dialogue: 0,0:18:03.13,0:18:04.72,Default,,0000,0000,0000,,when the flow is natural Dialogue: 0,0:18:04.72,0:18:07.59,Default,,0000,0000,0000,,when the work is sort of almost algorithmic nature Dialogue: 0,0:18:07.59,0:18:11.11,Default,,0000,0000,0000,,separated from all this context Dialogue: 0,0:18:11.18,0:18:13.59,Default,,0000,0000,0000,,alright. great. let's switch into that mode Dialogue: 0,0:18:13.59,0:18:19.39,Default,,0000,0000,0000,,but forcing all sort of other kinds of program work into this mode Dialogue: 0,0:18:19.46,0:18:22.55,Default,,0000,0000,0000,,just such that we can't feel the TDD loop? Dialogue: 0,0:18:22.62,0:18:26.28,Default,,0000,0000,0000,,that's where really see that we're going off track Dialogue: 0,0:18:26.34,0:18:28.43,Default,,0000,0000,0000,,and just coming up with some Dialogue: 0,0:18:28.49,0:18:33.41,Default,,0000,0000,0000,,in my opinion nasty hats we're starting really bad trade offs Dialogue: 0,0:18:33.50,0:18:38.38,Default,,0000,0000,0000,,for other aspects of the design of the code ???? Dialogue: 0,0:18:38.38,0:18:41.26,Default,,0000,0000,0000,,so I'm curious for both of you guys Dialogue: 0,0:18:41.26,0:18:44.72,Default,,0000,0000,0000,,how much you guys willing to sacrifice to get to that TDD flow? Dialogue: 0,0:18:44.78,0:18:48.16,Default,,0000,0000,0000,,are you willing to use heavy amount of mocking Dialogue: 0,0:18:48.22,0:18:51.41,Default,,0000,0000,0000,,do you find that generally you can get there Dialogue: 0,0:18:51.54,0:18:54.80,Default,,0000,0000,0000,,in, say, MVC style programming? Dialogue: 0,0:18:54.86,0:18:57.42,Default,,0000,0000,0000,,or where the boundaries for you guys. Dialogue: 0,0:18:57.48,0:19:03.30,Default,,0000,0000,0000,,Martin is waiting for me talk Dialogue: 0,0:19:03.38,0:19:04.57,Default,,0000,0000,0000,,so I guess I'm talking. Dialogue: 0,0:19:04.57,0:19:07.28,Default,,0000,0000,0000,,so as I see I do this all the time Dialogue: 0,0:19:07.28,0:19:09.64,Default,,0000,0000,0000,,it's a question of trade off Dialogue: 0,0:19:09.72,0:19:13.14,Default,,0000,0000,0000,,and my students see me do that at thousands times Dialogue: 0,0:19:13.14,0:19:16.35,Default,,0000,0000,0000,,so for me TDD is question of trade offs Dialogue: 0,0:19:16.45,0:19:21.09,Default,,0000,0000,0000,,and I think, David you pointed out an important part of trade off which is Dialogue: 0,0:19:21.15,0:19:29.32,Default,,0000,0000,0000,,to make a design intermediate results testable comes with a cost Dialogue: 0,0:19:29.40,0:19:32.25,Default,,0000,0000,0000,,it comes with a benefit too Dialogue: 0,0:19:32.25,0:19:37.27,Default,,0000,0000,0000,,and you gotta figure out whether the costs outweigh the benefits Dialogue: 0,0:19:37.27,0:19:42.81,Default,,0000,0000,0000,,sometimes that's a question of understanding how to design things well Dialogue: 0,0:19:42.95,0:19:46.30,Default,,0000,0000,0000,,so if I'm building a compiler Dialogue: 0,0:19:46.40,0:19:50.55,Default,,0000,0000,0000,,and I think well the only kind of test I can have are end to end tests Dialogue: 0,0:19:50.62,0:19:56.20,Default,,0000,0000,0000,,and then I start to build more and more cases of what the input looks like Dialogue: 0,0:19:56.20,0:19:59.76,Default,,0000,0000,0000,,and I realize, "oh, I have this intermediate representation of parse tree" Dialogue: 0,0:19:59.85,0:20:02.99,Default,,0000,0000,0000,,then now I can test parsing Dialogue: 0,0:20:02.99,0:20:05.38,Default,,0000,0000,0000,,now I have this two orthogonal dimensions Dialogue: 0,0:20:05.38,0:20:08.53,Default,,0000,0000,0000,,I have parsing and then given a parse tree Dialogue: 0,0:20:08.59,0:20:10.36,Default,,0000,0000,0000,,does it compute the right results? Dialogue: 0,0:20:10.45,0:20:15.27,Default,,0000,0000,0000,,and then I can do more testing at a finer grain Dialogue: 0,0:20:15.27,0:20:19.41,Default,,0000,0000,0000,,but it was a design insight that created that moment Dialogue: 0,0:20:19.50,0:20:25.91,Default,,0000,0000,0000,,and compilers have settled on that as being a reasonable trade off Dialogue: 0,0:20:25.91,0:20:28.59,Default,,0000,0000,0000,,"ok, it's worth having this intermediate representation" Dialogue: 0,0:20:28.66,0:20:34.25,Default,,0000,0000,0000,,"so that we can have testability and bunch of other stuffs comes along with it." Dialogue: 0,0:20:34.32,0:20:37.57,Default,,0000,0000,0000,,so I'm not willing to say Dialogue: 0,0:20:37.57,0:20:44.91,Default,,0000,0000,0000,,ok, there's some fixed boundaries and I don't wanna twist design just to make things testable Dialogue: 0,0:20:44.91,0:20:49.19,Default,,0000,0000,0000,,because I'm just missing some design idea Dialogue: 0,0:20:49.19,0:20:51.10,Default,,0000,0000,0000,,if I had better idea for the design Dialogue: 0,0:20:51.10,0:20:53.28,Default,,0000,0000,0000,,then I could have both ways Dialogue: 0,0:20:53.28,0:20:59.66,Default,,0000,0000,0000,,I could have something that was more static more flexible design and it was more testable at the same time. Dialogue: 0,0:20:59.66,0:21:02.41,Default,,0000,0000,0000,,but if I don't have that today Dialogue: 0,0:21:02.41,0:21:05.30,Default,,0000,0000,0000,,your point is exactly right Dialogue: 0,0:21:05.30,0:21:06.46,Default,,0000,0000,0000,,then what do you do? Dialogue: 0,0:21:06.46,0:21:09.82,Default,,0000,0000,0000,,do you mock absolutely everything? Dialogue: 0,0:21:09.82,0:21:12.70,Default,,0000,0000,0000,,my personal practice is I mock almost nothing Dialogue: 0,0:21:12.70,0:21:17.19,Default,,0000,0000,0000,,if I can't figure out how test efficiently with the real stuff Dialogue: 0,0:21:17.25,0:21:21.60,Default,,0000,0000,0000,,I find another way of creating feed back look for myself Dialogue: 0,0:21:21.66,0:21:23.05,Default,,0000,0000,0000,,I have to have feed back loop Dialogue: 0,0:21:23.05,0:21:25.82,Default,,0000,0000,0000,,and a feed back loop has to be repeatable Dialogue: 0,0:21:25.89,0:21:34.58,Default,,0000,0000,0000,,but like I just don't go very far down the mock path Dialogue: 0,0:21:34.58,0:21:41.54,Default,,0000,0000,0000,,look at code where you have mocks returning mocks returning mocks Dialogue: 0,0:21:41.54,0:21:44.46,Default,,0000,0000,0000,,and my experience is Dialogue: 0,0:21:44.53,0:21:48.58,Default,,0000,0000,0000,,if i use TDD I can refactor stuff Dialogue: 0,0:21:48.58,0:21:50.22,Default,,0000,0000,0000,,and then I heard this stories Dialogue: 0,0:21:50.31,0:21:54.66,Default,,0000,0000,0000,,People say, "I use TDD and now I can't refactor anything" Dialogue: 0,0:21:54.66,0:21:56.20,Default,,0000,0000,0000,,I couldn't understand that Dialogue: 0,0:21:56.20,0:21:58.25,Default,,0000,0000,0000,,and then I started to looking at their tests Dialogue: 0,0:21:58.25,0:22:02.48,Default,,0000,0000,0000,,well. if you have mocks returning mocks returning mocks Dialogue: 0,0:22:02.55,0:22:07.58,Default,,0000,0000,0000,,your test is completely coupled to the implementation. not the interface Dialogue: 0,0:22:07.58,0:22:09.97,Default,,0000,0000,0000,,but the exact implementation of some object Dialogue: 0,0:22:10.04,0:22:11.89,Default,,0000,0000,0000,,you know three streets away Dialogue: 0,0:22:11.96,0:22:15.49,Default,,0000,0000,0000,,of course you can't change anything without breaking the tests Dialogue: 0,0:22:15.49,0:22:18.63,Default,,0000,0000,0000,,so that for me is too higher price to pay Dialogue: 0,0:22:18.70,0:22:20.93,Default,,0000,0000,0000,,that's not a trad off I'm willing to make Dialogue: 0,0:22:20.93,0:22:24.84,Default,,0000,0000,0000,,just to get piecemeal development Dialogue: 0,0:22:24.91,0:22:28.60,Default,,0000,0000,0000,,And this is, I think, at the heart of much of this Dialogue: 0,0:22:28.65,0:22:32.17,Default,,0000,0000,0000,,is confusion of terminology Dialogue: 0,0:22:32.24,0:22:34.64,Default,,0000,0000,0000,,and what these different things are Dialogue: 0,0:22:34.64,0:22:40.98,Default,,0000,0000,0000,,when I read David's initial blog post Dialogue: 0,0:22:40.98,0:22:44.19,Default,,0000,0000,0000,,cause I didn't see his talk until last night Dialogue: 0,0:22:44.19,0:22:47.02,Default,,0000,0000,0000,,one of things that came through very clearly Dialogue: 0,0:22:47.13,0:22:49.70,Default,,0000,0000,0000,,was his criticism of Dialogue: 0,0:22:49.78,0:22:53.15,Default,,0000,0000,0000,,David, your criticism of TDD Dialogue: 0,0:22:53.24,0:22:56.74,Default,,0000,0000,0000,,and sort of design damage that comes through it Dialogue: 0,0:22:56.84,0:23:01.60,Default,,0000,0000,0000,,had in itself very much tide in a notion Dialogue: 0,0:23:01.66,0:23:05.22,Default,,0000,0000,0000,,with the strong desire for isolation of mocking Dialogue: 0,0:23:05.30,0:23:11.52,Default,,0000,0000,0000,,and there, very important point that Dialogue: 0,0:23:11.66,0:23:13.22,Default,,0000,0000,0000,,there is nothing sort of Dialogue: 0,0:23:13.29,0:23:17.35,Default,,0000,0000,0000,,with in the idea of how you do either TDD or unit testing Dialogue: 0,0:23:17.39,0:23:20.12,Default,,0000,0000,0000,,that says you have to have that kind of isolation Dialogue: 0,0:23:20.12,0:23:22.70,Default,,0000,0000,0000,,some people are very much in favor of it Dialogue: 0,0:23:22.70,0:23:23.88,Default,,0000,0000,0000,,others are not Dialogue: 0,0:23:23.88,0:23:26.55,Default,,0000,0000,0000,,and I remember in the early days of extreme programming Dialogue: 0,0:23:26.62,0:23:28.43,Default,,0000,0000,0000,,unit testing, people would criticize us Dialogue: 0,0:23:28.43,0:23:32.04,Default,,0000,0000,0000,,that saying, "hey you're not isolating your units properly" Dialogue: 0,0:23:32.04,0:23:33.38,Default,,0000,0000,0000,,"that's not unit testing" Dialogue: 0,0:23:33.45,0:23:39.06,Default,,0000,0000,0000,,and we had this whole conversation with 24 different definitions of unit testing or whatever it was Dialogue: 0,0:23:39.06,0:23:41.41,Default,,0000,0000,0000,,ans said, "Well, our style of unit testing" Dialogue: 0,0:23:41.48,0:23:43.20,Default,,0000,0000,0000,,"we don't bubble about the isolation" Dialogue: 0,0:23:43.27,0:23:45.84,Default,,0000,0000,0000,,"and you know, it's working well for us, thank you very much" Dialogue: 0,0:23:45.91,0:23:48.93,Default,,0000,0000,0000,,so that's one thing Dialogue: 0,0:23:48.93,0:23:53.36,Default,,0000,0000,0000,,whether TDD in unit testing should be tide with isolation Dialogue: 0,0:23:53.44,0:23:55.64,Default,,0000,0000,0000,,and I look at it as different schools of thought Dialogue: 0,0:23:55.64,0:23:56.83,Default,,0000,0000,0000,,and I'm with Kent Dialogue: 0,0:23:56.92,0:23:57.81,Default,,0000,0000,0000,,I hardly ever use mocks Dialogue: 0,0:23:57.81,0:24:01.27,Default,,0000,0000,0000,,but I know good people who do Dialogue: 0,0:24:01.34,0:24:04.12,Default,,0000,0000,0000,,so I don't want to shoot everybody who uses mocks Dialogue: 0,0:24:04.12,0:24:05.77,Default,,0000,0000,0000,,maybe give it 10 more years Dialogue: 0,0:24:05.78,0:24:08.10,Default,,0000,0000,0000,,and then ????will ??? out or something Dialogue: 0,0:24:08.10,0:24:09.95,Default,,0000,0000,0000,,but we'll see Dialogue: 0,0:24:10.01,0:24:17.68,Default,,0000,0000,0000,,then there's another thing which is distinction between having what I call self testing code and TDD Dialogue: 0,0:24:17.75,0:24:23.25,Default,,0000,0000,0000,,to me, it's really important have self testing code Dialogue: 0,0:24:23.32,0:24:28.75,Default,,0000,0000,0000,,the ability to be able to run a single command have your whole system self test itself Dialogue: 0,0:24:28.75,0:24:30.10,Default,,0000,0000,0000,,in an acceptable amount of time Dialogue: 0,0:24:30.10,0:24:32.73,Default,,0000,0000,0000,,that is really powerful Dialogue: 0,0:24:32.89,0:24:37.01,Default,,0000,0000,0000,,because then if you can do that you can refactor with confidence Dialogue: 0,0:24:37.01,0:24:40.50,Default,,0000,0000,0000,,you've got a good chance of keeping your code base healthy Dialogue: 0,0:24:40.50,0:24:45.09,Default,,0000,0000,0000,,and that means you're able to be fast deliver new feature, etc Dialogue: 0,0:24:45.18,0:24:47.05,Default,,0000,0000,0000,,that is really powerful thing Dialogue: 0,0:24:47.12,0:24:50.52,Default,,0000,0000,0000,,and if I wanna get a ???high horse and say you must do something Dialogue: 0,0:24:50.65,0:24:54.36,Default,,0000,0000,0000,,I might be inclined to get that particular high horse. Dialogue: 0,0:24:54.36,0:24:56.41,Default,,0000,0000,0000,,but to me at least Dialogue: 0,0:24:56.41,0:24:59.33,Default,,0000,0000,0000,,TDD is one way to approach that Dialogue: 0,0:24:59.33,0:25:01.81,Default,,0000,0000,0000,,TDD is very particular technique Dialogue: 0,0:25:01.88,0:25:05.80,Default,,0000,0000,0000,,and if done well, one of benefit is that it gives you self testing code Dialogue: 0,0:25:05.93,0:25:07.33,Default,,0000,0000,0000,,give you all those benefits as well Dialogue: 0,0:25:07.41,0:25:11.45,Default,,0000,0000,0000,,but self testing code is for me perhaps the primary benefit Dialogue: 0,0:25:11.45,0:25:14.22,Default,,0000,0000,0000,,and the two get comflated Dialogue: 0,0:25:14.24,0:25:19.59,Default,,0000,0000,0000,,now fundamentally if somebody get self testing code by another root Dialogue: 0,0:25:19.66,0:25:20.81,Default,,0000,0000,0000,,such as when we started Dialogue: 0,0:25:20.88,0:25:25.76,Default,,0000,0000,0000,,we're delivering the code and the test together at the end of iteration Dialogue: 0,0:25:25.83,0:25:28.70,Default,,0000,0000,0000,,and you've got that self testing confidence Dialogue: 0,0:25:28.79,0:25:30.59,Default,,0000,0000,0000,,then I'm actually pretty happy Dialogue: 0,0:25:30.72,0:25:34.81,Default,,0000,0000,0000,,I'm not gonna kind of feel upset that somebody got that by another root Dialogue: 0,0:25:34.81,0:25:38.01,Default,,0000,0000,0000,,and I share with David and Kent Dialogue: 0,0:25:38.01,0:25:40.77,Default,,0000,0000,0000,,there're problems where TDD doesn't work terribly well Dialogue: 0,0:25:40.77,0:25:43.54,Default,,0000,0000,0000,,sadly most of programming I do these days Dialogue: 0,0:25:43.64,0:25:45.17,Default,,0000,0000,0000,,is not conducive to TDD Dialogue: 0,0:25:45.25,0:25:46.29,Default,,0000,0000,0000,,and I miss it Dialogue: 0,0:25:46.36,0:25:48.60,Default,,0000,0000,0000,,because actually I really like the TDD flow Dialogue: 0,0:25:48.60,0:25:49.99,Default,,0000,0000,0000,,that really works for me Dialogue: 0,0:25:49.99,0:25:51.37,Default,,0000,0000,0000,,just as it works for Kent Dialogue: 0,0:25:51.44,0:25:56.54,Default,,0000,0000,0000,,but fundamentally we have to separate TDD from self testing code Dialogue: 0,0:25:56.54,0:25:58.44,Default,,0000,0000,0000,,on realize they have different benefit Dialogue: 0,0:25:58.54,0:26:00.01,Default,,0000,0000,0000,,so often get conflated together Dialogue: 0,0:26:00.01,0:26:04.46,Default,,0000,0000,0000,,and we have to separate the idea of fully isolated unit testing Dialogue: 0,0:26:04.56,0:26:06.78,Default,,0000,0000,0000,,from not isolated unit testing Dialogue: 0,0:26:06.85,0:26:10.20,Default,,0000,0000,0000,,and realize that people have different preferences around those Dialogue: 0,0:26:10.31,0:26:13.25,Default,,0000,0000,0000,,and that's where I see Dialogue: 0,0:26:13.32,0:26:17.78,Default,,0000,0000,0000,,that was what much of my reaction was against, right? Dialogue: 0,0:26:17.87,0:26:21.71,Default,,0000,0000,0000,,that we had his prevailing definition of TDD Dialogue: 0,0:26:21.71,0:26:25.28,Default,,0000,0000,0000,,as not from you guys, from Kent Dialogue: 0,0:26:25.28,0:26:30.25,Default,,0000,0000,0000,,but from the people currently speaking in the program environment that I found was Dialogue: 0,0:26:30.35,0:26:31.90,Default,,0000,0000,0000,,A) very mock heavy Dialogue: 0,0:26:31.100,0:26:39.49,Default,,0000,0000,0000,,B) was very moralistic about the specific technique to get to the place we all want to get to Dialogue: 0,0:26:39.57,0:26:42.58,Default,,0000,0000,0000,,we all want to get to feel confident about making changes to the code Dialogue: 0,0:26:42.64,0:26:46.27,Default,,0000,0000,0000,,having self-test system that can run as a command and all these things Dialogue: 0,0:26:46.34,0:26:50.22,Default,,0000,0000,0000,,but you couldn't be part of that vote??? Dialogue: 0,0:26:50.22,0:26:53.35,Default,,0000,0000,0000,,unless you also signed up for the TDD road to get there Dialogue: 0,0:26:53.46,0:26:57.88,Default,,0000,0000,0000,,and that's where I found it really frustrating Dialogue: 0,0:26:57.97,0:27:02.45,Default,,0000,0000,0000,,that we could have talked about whether we were being professionls or not Dialogue: 0,0:27:02.56,0:27:03.99,Default,,0000,0000,0000,,and that went through Dialogue: 0,0:27:03.99,0:27:05.57,Default,,0000,0000,0000,,well, you're writing test first Dialogue: 0,0:27:05.58,0:27:06.91,Default,,0000,0000,0000,,or you're writing them second Dialogue: 0,0:27:06.91,0:27:11.46,Default,,0000,0000,0000,,and related to that the whole TDD notion was propped up as Dialogue: 0,0:27:11.46,0:27:13.69,Default,,0000,0000,0000,,oh, well that self testing code you get Dialogue: 0,0:27:13.69,0:27:15.33,Default,,0000,0000,0000,,that's just a bi-product Dialogue: 0,0:27:15.41,0:27:23.33,Default,,0000,0000,0000,,that's a side benefit that some leftovers from driving your design through the tests, right? Dialogue: 0,0:27:23.41,0:27:28.09,Default,,0000,0000,0000,,that a lot of people really ??? onto this idea that TDD was not about self testing code Dialogue: 0,0:27:28.16,0:27:31.43,Default,,0000,0000,0000,,that was just a nice to have Dialogue: 0,0:27:31.43,0:27:33.50,Default,,0000,0000,0000,,but the key benefit was Dialogue: 0,0:27:33.57,0:27:38.04,Default,,0000,0000,0000,,the notion that you could only improve your design by making more testable Dialogue: 0,0:27:38.04,0:27:39.47,Default,,0000,0000,0000,,those two things equated Dialogue: 0,0:27:39.47,0:27:44.49,Default,,0000,0000,0000,,that easier to unit system was better designed system Dialogue: 0,0:27:44.49,0:27:50.15,Default,,0000,0000,0000,,that's the main heart of the fallacy and I want to take a real big swing at Dialogue: 0,0:27:50.24,0:27:53.71,Default,,0000,0000,0000,,because I started seeing a whole lot of code with this was not true at all Dialogue: 0,0:27:53.81,0:27:55.23,Default,,0000,0000,0000,,the code was not better Dialogue: 0,0:27:55.35,0:27:56.50,Default,,0000,0000,0000,,was not better design Dialogue: 0,0:27:56.58,0:27:58.37,Default,,0000,0000,0000,,just because it was more testable Dialogue: 0,0:27:58.37,0:27:59.76,Default,,0000,0000,0000,,it was full of these Dialogue: 0,0:27:59.85,0:28:02.21,Default,,0000,0000,0000,,mock that you guys talk about???? Dialogue: 0,0:28:02.21,0:28:09.27,Default,,0000,0000,0000,,because we're trying to apply the unit test paradigm to areas of code that really didn't fit it very well Dialogue: 0,0:28:09.37,0:28:15.12,Default,,0000,0000,0000,,and we were discarding all sorts of really useful techniques, really useful patterns like Active Record Dialogue: 0,0:28:15.12,0:28:16.34,Default,,0000,0000,0000,,because it didn't fit Dialogue: 0,0:28:16.43,0:28:20.60,Default,,0000,0000,0000,,this notion of unit tests that had to run in 300 milliseconds Dialogue: 0,0:28:20.60,0:28:21.87,Default,,0000,0000,0000,,couldn't talk to the database Dialogue: 0,0:28:21.87,0:28:23.56,Default,,0000,0000,0000,,??? wasn't isolated, right? Dialogue: 0,0:28:23.56,0:28:27.34,Default,,0000,0000,0000,,so we had to throw out all these productive work Dialogue: 0,0:28:27.34,0:28:32.72,Default,,0000,0000,0000,,just so that we put ??? about alter of Test Driven Design Dialogue: 0,0:28:32.72,0:28:37.17,Default,,0000,0000,0000,,and that every aspect or our system could be unit tested in isolation Dialogue: 0,0:28:37.26,0:28:41.30,Default,,0000,0000,0000,,that's where I think we needed reboot Dialogue: 0,0:28:41.37,0:28:43.75,Default,,0000,0000,0000,,and I think we still need to reboot Dialogue: 0,0:28:43.83,0:28:44.93,Default,,0000,0000,0000,,we haven't rebooted enough Dialogue: 0,0:28:44.93,0:28:46.60,Default,,0000,0000,0000,,like these thing to still intermingled Dialogue: 0,0:28:46.60,0:28:51.76,Default,,0000,0000,0000,,and while I think we're all very much in the same page Dialogue: 0,0:28:51.83,0:28:53.94,Default,,0000,0000,0000,,and trying to tease these things apart Dialogue: 0,0:28:53.94,0:28:57.19,Default,,0000,0000,0000,,most people throwing all into one big pot Dialogue: 0,0:28:57.26,0:28:58.99,Default,,0000,0000,0000,,they're calling that pot, TDD Dialogue: 0,0:28:58.99,0:29:01.25,Default,,0000,0000,0000,,and TDD means self tested code Dialogue: 0,0:29:01.25,0:29:02.80,Default,,0000,0000,0000,,and it means red green refactor Dialogue: 0,0:29:02.80,0:29:06.04,Default,,0000,0000,0000,,and it means mocks because you have to unit test everything Dialogue: 0,0:29:06.04,0:29:10.22,Default,,0000,0000,0000,,and it means this big ball of shit in some ways Dialogue: 0,0:29:10.22,0:29:12.42,Default,,0000,0000,0000,,because that's what comes out of it Dialogue: 0,0:29:12.49,0:29:14.45,Default,,0000,0000,0000,,the dish in the end it's just not tasty Dialogue: 0,0:29:14.52,0:29:16.09,Default,,0000,0000,0000,,the code is not great Dialogue: 0,0:29:16.09,0:29:21.90,Default,,0000,0000,0000,,there're other more important sacred principles than it's just testable Dialogue: 0,0:29:21.90,0:29:24.48,Default,,0000,0000,0000,,as in if the system clear and understandable Dialogue: 0,0:29:24.48,0:29:26.46,Default,,0000,0000,0000,,and all the other aspects of it Dialogue: 0,0:29:26.46,0:29:29.18,Default,,0000,0000,0000,,so that's where my frustration really is Dialogue: 0,0:29:29.27,0:29:31.51,Default,,0000,0000,0000,,so I get to play time cut now Dialogue: 0,0:29:31.63,0:29:32.98,Default,,0000,0000,0000,,we said we'd do 30 minutes Dialogue: 0,0:29:32.98,0:29:34.76,Default,,0000,0000,0000,,30 minutes has come up Dialogue: 0,0:29:34.76,0:29:38.41,Default,,0000,0000,0000,,and it seems that we'll do another one of this hang out Dialogue: 0,0:29:38.48,0:29:41.39,Default,,0000,0000,0000,,sometime in the future we haven't decided yet Dialogue: 0,0:29:41.39,0:29:45.27,Default,,0000,0000,0000,,but I think one way we can immediately begin is to explore this question Dialogue: 0,0:29:45.27,0:29:50.31,Default,,0000,0000,0000,,in what ways can a desire to TDD damage an architecture Dialogue: 0,0:29:50.41,0:29:52.76,Default,,0000,0000,0000,,and is it damage, right? Dialogue: 0,0:29:52.76,0:29:58.39,Default,,0000,0000,0000,,some people say the hexagonal rails stuff is much better that crap DHH is imposing on us Dialogue: 0,0:29:58.46,0:29:59.86,Default,,0000,0000,0000,,is that the case? Dialogue: 0,0:29:59.93,0:30:01.01,Default,,0000,0000,0000,,how do we evaluate it? Dialogue: 0,0:30:01.10,0:30:04.36,Default,,0000,0000,0000,,those sound like good questions to tacklle in the text episode Dialogue: 0,0:30:04.44,0:30:07.94,Default,,0000,0000,0000,,alright, thanks a lot Dialogue: 0,0:30:11.12,0:30:15.96,Default,,0000,0000,0000,,we'll set up a new date and shoot out another link Dialogue: 0,0:30:16.04,0:30:17.48,Default,,0000,0000,0000,,that's great Dialogue: 0,0:30:17.56,0:30:20.43,Default,,0000,0000,0000,,bye, bye