[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:25.70,0:00:27.68,Default,,0000,0000,0000,,PAVAN SUDARSHAN: Hi. My name is Pavan. Dialogue: 0,0:00:27.68,0:00:31.32,Default,,0000,0000,0000,,ANANDHA KRISHNAN: And I'm Anandha Krishnan.\NI'm Dialogue: 0,0:00:31.32,0:00:35.98,Default,,0000,0000,0000,,also called Jake. Not Anandha. I know. We\Nwork Dialogue: 0,0:00:35.98,0:00:37.39,Default,,0000,0000,0000,,at MavenHive technologies. Dialogue: 0,0:00:37.39,0:00:40.45,Default,,0000,0000,0000,,P.S.: This is probably the only Dialogue: 0,0:00:40.45,0:00:42.76,Default,,0000,0000,0000,,talk where there are two speakers, and we\Nhaven't Dialogue: 0,0:00:42.76,0:00:45.26,Default,,0000,0000,0000,,rehearsed who says what, so we'll be stepping\Non Dialogue: 0,0:00:45.26,0:00:47.75,Default,,0000,0000,0000,,each other's toes, so yeah. Bear with us.\NSo Dialogue: 0,0:00:47.75,0:00:50.26,Default,,0000,0000,0000,,yeah. Quick disclaimer: Most of what we are\Ngoing Dialogue: 0,0:00:50.26,0:00:52.59,Default,,0000,0000,0000,,to talk about is actually platform and language\Nindependent, Dialogue: 0,0:00:52.59,0:00:55.51,Default,,0000,0000,0000,,or at least, in a sense, learned. But the Dialogue: 0,0:00:55.51,0:00:58.37,Default,,0000,0000,0000,,reason we are talking here in a Ruby Conf Dialogue: 0,0:00:58.37,0:01:01.18,Default,,0000,0000,0000,,is because of the Ruby community. We really\Nthink Dialogue: 0,0:01:01.18,0:01:02.88,Default,,0000,0000,0000,,that a lot of things we are going to Dialogue: 0,0:01:02.88,0:01:04.74,Default,,0000,0000,0000,,talk about resonates really well with the\Ncommunity, and Dialogue: 0,0:01:04.74,0:01:07.29,Default,,0000,0000,0000,,we are hoping to, you know, drive a good Dialogue: 0,0:01:07.29,0:01:10.89,Default,,0000,0000,0000,,discussion, conversation, whatever it is,\Nfrom this audience. So Dialogue: 0,0:01:10.89,0:01:13.34,Default,,0000,0000,0000,,that's really why we are talking here on this Dialogue: 0,0:01:13.34,0:01:13.66,Default,,0000,0000,0000,,topic. Dialogue: 0,0:01:13.66,0:01:15.35,Default,,0000,0000,0000,,A.K.: And a lot of the points that Dialogue: 0,0:01:15.35,0:01:17.46,Default,,0000,0000,0000,,we're going to talk about kind of naturally\Napply Dialogue: 0,0:01:17.46,0:01:22.39,Default,,0000,0000,0000,,to Rails and Ruby. And most of these we Dialogue: 0,0:01:22.39,0:01:25.86,Default,,0000,0000,0000,,learned, and we sort of experience in our\Nprojects, Dialogue: 0,0:01:25.86,0:01:29.49,Default,,0000,0000,0000,,which are mostly in Ruby and Rails, so. Dialogue: 0,0:01:29.49,0:01:33.62,Default,,0000,0000,0000,,P.S.: Yeah, so let's start with condition.\NWe have screwed Dialogue: 0,0:01:33.62,0:01:36.29,Default,,0000,0000,0000,,up a lot in our careers. Right, between me Dialogue: 0,0:01:36.29,0:01:38.74,Default,,0000,0000,0000,,and Jake, we have no idea how many mistakes Dialogue: 0,0:01:38.74,0:01:41.22,Default,,0000,0000,0000,,we have made. And on those rare occassions,\Nwe Dialogue: 0,0:01:41.22,0:01:43.13,Default,,0000,0000,0000,,have actually learned from it, or at least\Nwe Dialogue: 0,0:01:43.13,0:01:46.36,Default,,0000,0000,0000,,would like to think so. So yeah, this talk Dialogue: 0,0:01:46.36,0:01:52.79,Default,,0000,0000,0000,,is about one such mistake from which we learned, Dialogue: 0,0:01:52.79,0:01:53.10,Default,,0000,0000,0000,,and yeah. Dialogue: 0,0:01:53.10,0:01:54.90,Default,,0000,0000,0000,,A.K.: And, yes, I think most of Dialogue: 0,0:01:54.90,0:01:57.44,Default,,0000,0000,0000,,it, we just put it up front, just based Dialogue: 0,0:01:57.44,0:02:00.39,Default,,0000,0000,0000,,on projects, and you know, as we were talking Dialogue: 0,0:02:00.39,0:02:03.52,Default,,0000,0000,0000,,about what happened with each of us, and things Dialogue: 0,0:02:03.52,0:02:06.07,Default,,0000,0000,0000,,like that. So yeah, just trying to make it, Dialogue: 0,0:02:06.07,0:02:09.01,Default,,0000,0000,0000,,you know, presentable and that stuff. But\Nwe- Dialogue: 0,0:02:09.01,0:02:11.68,Default,,0000,0000,0000,,P.S.: Yeah, like, though we screwed up, we\Nwould like Dialogue: 0,0:02:11.68,0:02:14.17,Default,,0000,0000,0000,,to believe that no employers or paranoid androids\Nwere Dialogue: 0,0:02:14.17,0:02:17.36,Default,,0000,0000,0000,,hurt in the process of our mistakes, so yeah. Dialogue: 0,0:02:17.36,0:02:21.23,Default,,0000,0000,0000,,OK, about three months back, so why pharamcist\Nand Dialogue: 0,0:02:21.23,0:02:23.93,Default,,0000,0000,0000,,doctors, right? So about three months about\NI was Dialogue: 0,0:02:23.93,0:02:28.12,Default,,0000,0000,0000,,in this pharmacy buying diapers for my daughter,\Nand Dialogue: 0,0:02:28.12,0:02:30.09,Default,,0000,0000,0000,,in walks this guy - he just goes straight Dialogue: 0,0:02:30.09,0:02:33.70,Default,,0000,0000,0000,,to the pharmacist and he's like, hey, can\Nyou Dialogue: 0,0:02:33.70,0:02:36.91,Default,,0000,0000,0000,,give me something for a toothache? There was\Nsomething Dialogue: 0,0:02:36.91,0:02:40.49,Default,,0000,0000,0000,,very interesting and weird about this, and\NJake and Dialogue: 0,0:02:40.49,0:02:42.54,Default,,0000,0000,0000,,I, we carpool. So the next morning I was Dialogue: 0,0:02:42.54,0:02:45.34,Default,,0000,0000,0000,,just telling Jake, and between the two of\Nus, Dialogue: 0,0:02:45.34,0:02:50.34,Default,,0000,0000,0000,,like, between the two of us, we realized that Dialogue: 0,0:02:50.34,0:02:54.15,Default,,0000,0000,0000,,we have seen people ask for all sorts of Dialogue: 0,0:02:54.15,0:02:56.83,Default,,0000,0000,0000,,medicines in a pharmacy. Right. Headaches,\Nfever, like, like, Dialogue: 0,0:02:56.83,0:02:59.64,Default,,0000,0000,0000,,true story, I even once saw this guy with Dialogue: 0,0:02:59.64,0:03:04.52,Default,,0000,0000,0000,,a lot of cuts on his face from a Dialogue: 0,0:03:04.52,0:03:06.94,Default,,0000,0000,0000,,knife, and yeah. Insane. Insane, right. So\Nabout, when Dialogue: 0,0:03:06.94,0:03:08.93,Default,,0000,0000,0000,,we were talking about this, we thought there\Nwas Dialogue: 0,0:03:08.93,0:03:11.39,Default,,0000,0000,0000,,something fundamentally wrong with this. Is\Nthere anyone here Dialogue: 0,0:03:11.39,0:03:14.00,Default,,0000,0000,0000,,who thinks that it's totally OK for you to Dialogue: 0,0:03:14.00,0:03:21.00,Default,,0000,0000,0000,,just walk up to a pharmacist and ask for Dialogue: 0,0:03:25.13,0:03:28.12,Default,,0000,0000,0000,,a medicine? Oh yeah, cool. Yeah, so. Nice.\NOK. Dialogue: 0,0:03:28.12,0:03:31.27,Default,,0000,0000,0000,,Hold that thought. Yeah, but like. So what\Nwe Dialogue: 0,0:03:31.27,0:03:34.40,Default,,0000,0000,0000,,think, yes, a pharmacy potentially has a cure\Nfor Dialogue: 0,0:03:34.40,0:03:37.39,Default,,0000,0000,0000,,pretty much any, most ailments that you could\Nthink Dialogue: 0,0:03:37.39,0:03:41.12,Default,,0000,0000,0000,,of, and but the important thing is, though,\Nyou Dialogue: 0,0:03:41.12,0:03:43.10,Default,,0000,0000,0000,,need to know what ailment you have. Right,\Nthere's Dialogue: 0,0:03:43.10,0:03:47.26,Default,,0000,0000,0000,,that small implementation detail, right. And\Nif it was Dialogue: 0,0:03:47.26,0:03:48.62,Default,,0000,0000,0000,,that easy for you to just go to the Dialogue: 0,0:03:48.62,0:03:51.84,Default,,0000,0000,0000,,right medicine and get it, this world would\Nbe Dialogue: 0,0:03:51.84,0:03:56.73,Default,,0000,0000,0000,,filled with only pharmacists and not doctors,\Nright. Yeah, Dialogue: 0,0:03:56.73,0:03:59.33,Default,,0000,0000,0000,,so that's, so that's where the whole analogy\Nstarts, Dialogue: 0,0:03:59.33,0:04:01.27,Default,,0000,0000,0000,,and then we'll get to how we connect to Dialogue: 0,0:04:01.27,0:04:02.18,Default,,0000,0000,0000,,what we're going to talk about. Dialogue: 0,0:04:02.18,0:04:05.81,Default,,0000,0000,0000,,A.K.: Yeah, and that's, that's where we, in\Na sort of thought Dialogue: 0,0:04:05.81,0:04:09.16,Default,,0000,0000,0000,,that we use this metaphor to drive home that Dialogue: 0,0:04:09.16,0:04:11.86,Default,,0000,0000,0000,,point. Of course, a lot of you might have Dialogue: 0,0:04:11.86,0:04:15.27,Default,,0000,0000,0000,,your opinions about self-medication and the\Nwhole thing. So Dialogue: 0,0:04:15.27,0:04:18.79,Default,,0000,0000,0000,,we'll stop it at this, and we will give Dialogue: 0,0:04:18.79,0:04:21.27,Default,,0000,0000,0000,,us, our definition of what we think about\Nthese Dialogue: 0,0:04:21.27,0:04:25.61,Default,,0000,0000,0000,,two sort of mindsets actually are and, you\Nknow. Dialogue: 0,0:04:25.61,0:04:29.61,Default,,0000,0000,0000,,So starting off with like doctors, right.\NThey don't Dialogue: 0,0:04:29.61,0:04:32.58,Default,,0000,0000,0000,,treat, rarely, they don't try to treat the\Nsymptoms, Dialogue: 0,0:04:32.58,0:04:34.71,Default,,0000,0000,0000,,it's about how you deal with them. So they Dialogue: 0,0:04:34.71,0:04:36.97,Default,,0000,0000,0000,,go about just figuring out what the problem\Ncould Dialogue: 0,0:04:36.97,0:04:40.12,Default,,0000,0000,0000,,be, you know, and then probably, you know,\Na Dialogue: 0,0:04:40.12,0:04:43.33,Default,,0000,0000,0000,,lot of tests, make you run through a few Dialogue: 0,0:04:43.33,0:04:46.25,Default,,0000,0000,0000,,tests or try and figure out what's what, if Dialogue: 0,0:04:46.25,0:04:49.46,Default,,0000,0000,0000,,indeed it is the problem, and then try and, Dialogue: 0,0:04:49.46,0:04:53.67,Default,,0000,0000,0000,,based on that, prescribe a treatment and,\Nof course, Dialogue: 0,0:04:53.67,0:04:55.66,Default,,0000,0000,0000,,make sure that you're OK at the end of Dialogue: 0,0:04:55.66,0:04:58.08,Default,,0000,0000,0000,,it, right. The symptoms are gone. Dialogue: 0,0:04:58.08,0:05:01.25,Default,,0000,0000,0000,,P.S.: And we didn't take a look through a\Nmedical textbook, so Dialogue: 0,0:05:01.25,0:05:02.96,Default,,0000,0000,0000,,we don't know if this is right, but assuming Dialogue: 0,0:05:02.96,0:05:06.06,Default,,0000,0000,0000,,it is, though, this is what worked for us, Dialogue: 0,0:05:06.06,0:05:06.54,Default,,0000,0000,0000,,so. Dialogue: 0,0:05:06.54,0:05:10.62,Default,,0000,0000,0000,,A.K.: And, again, in contrast, a pharmacist's\Njob, Dialogue: 0,0:05:10.62,0:05:14.36,Default,,0000,0000,0000,,we think very different, should be more about\Nunderstanding Dialogue: 0,0:05:14.36,0:05:18.60,Default,,0000,0000,0000,,the medicines, the medicines themselves. Probably\Neven figure out Dialogue: 0,0:05:18.60,0:05:21.00,Default,,0000,0000,0000,,what the disease is based on the medicine,\Nright. Dialogue: 0,0:05:21.00,0:05:24.85,Default,,0000,0000,0000,,But definitely they don't really think about,\Nyou know, Dialogue: 0,0:05:24.85,0:05:26.79,Default,,0000,0000,0000,,what was the problem originally or what are\Nwe Dialogue: 0,0:05:26.79,0:05:29.42,Default,,0000,0000,0000,,prescribing the treatment for. And they usually\Ndon't do Dialogue: 0,0:05:29.42,0:05:31.22,Default,,0000,0000,0000,,it. Hopefully they don't do it. Dialogue: 0,0:05:31.22,0:05:32.12,Default,,0000,0000,0000,,P.S.: Yeah. OK. Dialogue: 0,0:05:32.12,0:05:33.88,Default,,0000,0000,0000,,So now with this context of what we mean Dialogue: 0,0:05:33.88,0:05:37.56,Default,,0000,0000,0000,,by a doctor and a pharmacist and medicines\Nand Dialogue: 0,0:05:37.56,0:05:40.58,Default,,0000,0000,0000,,self-medication, all right. Let's get back\Nto our mistake, Dialogue: 0,0:05:40.58,0:05:44.31,Default,,0000,0000,0000,,which we want to talk about. Right. So our Dialogue: 0,0:05:44.31,0:05:45.67,Default,,0000,0000,0000,,mistake that we want to talk about is a Dialogue: 0,0:05:45.67,0:05:47.61,Default,,0000,0000,0000,,way we have dealt with, or rather we used Dialogue: 0,0:05:47.61,0:05:50.78,Default,,0000,0000,0000,,to deal with bad symptoms on our code bases Dialogue: 0,0:05:50.78,0:05:54.63,Default,,0000,0000,0000,,and on our projects, right. So you, a lot Dialogue: 0,0:05:54.63,0:05:57.68,Default,,0000,0000,0000,,of times you see these in your code bases. Dialogue: 0,0:05:57.68,0:06:01.13,Default,,0000,0000,0000,,There's the symptom, or there are some issues,\Nright. Dialogue: 0,0:06:01.13,0:06:04.36,Default,,0000,0000,0000,,So we obviously had a lot of those, in Dialogue: 0,0:06:04.36,0:06:07.08,Default,,0000,0000,0000,,every single project we have worked on, and\Nthis Dialogue: 0,0:06:07.08,0:06:09.31,Default,,0000,0000,0000,,is about how we dealt with that, right. Dialogue: 0,0:06:09.31,0:06:12.74,Default,,0000,0000,0000,,A.K.: Let's start off with one very simple\None, or Dialogue: 0,0:06:12.74,0:06:14.69,Default,,0000,0000,0000,,at least the one which was the most easily Dialogue: 0,0:06:14.69,0:06:15.44,Default,,0000,0000,0000,,expressible. Dialogue: 0,0:06:15.44,0:06:18.93,Default,,0000,0000,0000,,P.S.: Yeah, as in, Tejas Dinkar, who has Dialogue: 0,0:06:18.93,0:06:21.56,Default,,0000,0000,0000,,already been mentioned several times in different\Ntalks, he Dialogue: 0,0:06:21.56,0:06:24.38,Default,,0000,0000,0000,,threatened us to throw off the stage if we Dialogue: 0,0:06:24.38,0:06:28.41,Default,,0000,0000,0000,,took anything more than twenty-nine minutes,\Nfifty-nine seconds. So Dialogue: 0,0:06:28.41,0:06:32.39,Default,,0000,0000,0000,,we had to like really dumbify our, you know, Dialogue: 0,0:06:32.39,0:06:34.89,Default,,0000,0000,0000,,anecdotes. But you learn, we have like a quick Dialogue: 0,0:06:34.89,0:06:36.44,Default,,0000,0000,0000,,mention of different things which we would\Nlove to Dialogue: 0,0:06:36.44,0:06:40.21,Default,,0000,0000,0000,,talk about offline, but yeah. So thanks Dejas. Dialogue: 0,0:06:40.21,0:06:43.27,Default,,0000,0000,0000,,A.K.: So we'll get started on the first one.\NSo Dialogue: 0,0:06:43.27,0:06:45.80,Default,,0000,0000,0000,,this was a project where we had a familiar Dialogue: 0,0:06:45.80,0:06:49.34,Default,,0000,0000,0000,,problem of regression bugs. We added new features,\Nand Dialogue: 0,0:06:49.34,0:06:53.46,Default,,0000,0000,0000,,that kept breaking things. So this is what\Nwe Dialogue: 0,0:06:53.46,0:06:56.12,Default,,0000,0000,0000,,designed. We want this down. We want the number Dialogue: 0,0:06:56.12,0:06:58.65,Default,,0000,0000,0000,,of bugs down from 10 to 5, you know. Dialogue: 0,0:06:58.65,0:07:01.25,Default,,0000,0000,0000,,At that time it was, like, let's set up Dialogue: 0,0:07:01.25,0:07:03.41,Default,,0000,0000,0000,,this goal, let's try and achieve this. What\Ndid Dialogue: 0,0:07:03.41,0:07:05.41,Default,,0000,0000,0000,,we do? Oh, before that. Some facts about the Dialogue: 0,0:07:05.41,0:07:09.47,Default,,0000,0000,0000,,project, right. This was not a project we\Nstarted Dialogue: 0,0:07:09.47,0:07:11.81,Default,,0000,0000,0000,,on from scratch, it was a lot of legacy Dialogue: 0,0:07:11.81,0:07:13.28,Default,,0000,0000,0000,,code, a lot of code that we did not Dialogue: 0,0:07:13.28,0:07:17.56,Default,,0000,0000,0000,,understand, and probably that's why we thought\Nit was Dialogue: 0,0:07:17.56,0:07:19.28,Default,,0000,0000,0000,,bad. And the test coverage was- Dialogue: 0,0:07:19.28,0:07:21.91,Default,,0000,0000,0000,,P.S.: How many of you have taken over a code\Nbase from Dialogue: 0,0:07:21.91,0:07:24.16,Default,,0000,0000,0000,,another team and thought the code base was\Nawesome? Dialogue: 0,0:07:24.16,0:07:29.11,Default,,0000,0000,0000,,Very small samples, so you realize what we\Nmean Dialogue: 0,0:07:29.11,0:07:32.32,Default,,0000,0000,0000,,when we thought it was bad. So. Dialogue: 0,0:07:32.32,0:07:33.07,Default,,0000,0000,0000,,A.K.: Sure. Dialogue: 0,0:07:33.07,0:07:36.20,Default,,0000,0000,0000,,So test-coverage was low, which was probably\None of Dialogue: 0,0:07:36.20,0:07:39.47,Default,,0000,0000,0000,,the reasons why people complained about the\Ncode base, Dialogue: 0,0:07:39.47,0:07:41.99,Default,,0000,0000,0000,,of course. So what's your guess? Dialogue: 0,0:07:41.99,0:07:46.09,Default,,0000,0000,0000,,P.S.: OK, so the problem we had was every\Ntime we checked Dialogue: 0,0:07:46.09,0:07:48.64,Default,,0000,0000,0000,,in something, built a new feature, touch any\Npart Dialogue: 0,0:07:48.64,0:07:50.33,Default,,0000,0000,0000,,of the code base, we ended up breaking a Dialogue: 0,0:07:50.33,0:07:52.28,Default,,0000,0000,0000,,whole bunch of other things. And we would\Nnot Dialogue: 0,0:07:52.28,0:07:54.30,Default,,0000,0000,0000,,even know it right away, we would know it Dialogue: 0,0:07:54.30,0:07:55.24,Default,,0000,0000,0000,,over a period of time. Right, so this was Dialogue: 0,0:07:55.24,0:07:57.93,Default,,0000,0000,0000,,a regression problem. And given the facts,\Nwhat would Dialogue: 0,0:07:57.93,0:07:59.00,Default,,0000,0000,0000,,you probably have done? Dialogue: 0,0:07:59.00,0:08:00.86,Default,,0000,0000,0000,,A.K.: I'll try and just Dialogue: 0,0:08:00.86,0:08:03.91,Default,,0000,0000,0000,,go back again, and then hopefully forward\N- we're Dialogue: 0,0:08:03.91,0:08:04.68,Default,,0000,0000,0000,,done [00:08:04]??. Dialogue: 0,0:08:04.68,0:08:07.75,Default,,0000,0000,0000,,P.S.: Yeah, based on some facts. Dialogue: 0,0:08:07.75,0:08:13.82,Default,,0000,0000,0000,,A.K.: Sure, so the low coverage was definitely\Na problem. Dialogue: 0,0:08:13.82,0:08:17.04,Default,,0000,0000,0000,,We thought, I mean, everybody agreed that\Nwe need Dialogue: 0,0:08:17.04,0:08:19.88,Default,,0000,0000,0000,,to start working on that, and you know, fix Dialogue: 0,0:08:19.88,0:08:23.34,Default,,0000,0000,0000,,the coverage. So we went in there, put the Dialogue: 0,0:08:23.34,0:08:26.15,Default,,0000,0000,0000,,coverage tool in place, you know. And then\Nwe Dialogue: 0,0:08:26.15,0:08:28.17,Default,,0000,0000,0000,,decided we will write tests for every bug\Nwe Dialogue: 0,0:08:28.17,0:08:32.61,Default,,0000,0000,0000,,caught. We got the coverage up, not very surprising, Dialogue: 0,0:08:32.61,0:08:36.28,Default,,0000,0000,0000,,I mean, we didn't manage to- you know, improving Dialogue: 0,0:08:36.28,0:08:37.20,Default,,0000,0000,0000,,the coverage- Dialogue: 0,0:08:37.20,0:08:41.04,Default,,0000,0000,0000,,P.S.: Yeah like, so we spend like the whole\Ntime- Dialogue: 0,0:08:41.04,0:08:42.54,Default,,0000,0000,0000,,A.K.: over a period of time. Dialogue: 0,0:08:42.54,0:08:44.88,Default,,0000,0000,0000,,P.S.: OK, so, like so this was a problem, Dialogue: 0,0:08:44.88,0:08:46.36,Default,,0000,0000,0000,,right. When you look at that, when you try Dialogue: 0,0:08:46.52,0:08:48.38,Default,,0000,0000,0000,,to abstract the, into, like what our thought\Nprocess Dialogue: 0,0:08:48.44,0:08:56.54,Default,,0000,0000,0000,,was. It was something like this, right. Check.\NYeah. Dialogue: 0,0:08:56.54,0:08:58.62,Default,,0000,0000,0000,,So, we had a symptom. In this case it Dialogue: 0,0:08:58.62,0:09:04.14,Default,,0000,0000,0000,,was low test-coverage, and - Jake - and we Dialogue: 0,0:09:04.14,0:09:06.75,Default,,0000,0000,0000,,had, we decided on what metric and tool to Dialogue: 0,0:09:06.75,0:09:09.70,Default,,0000,0000,0000,,use. In our case it was a simple line Dialogue: 0,0:09:09.70,0:09:11.57,Default,,0000,0000,0000,,coverage, right and, archive?? [00:09:10],\Nthis was back in Dialogue: 0,0:09:11.57,0:09:14.93,Default,,0000,0000,0000,,the days. And then we started solving that\Nproblem Dialogue: 0,0:09:14.93,0:09:17.55,Default,,0000,0000,0000,,that we had, and then, you know, hopefully,\Nfor Dialogue: 0,0:09:17.55,0:09:20.67,Default,,0000,0000,0000,,example, we were TDDing most of the new code Dialogue: 0,0:09:20.67,0:09:23.97,Default,,0000,0000,0000,,that we wrote, so coverage was good on that, Dialogue: 0,0:09:23.97,0:09:28.50,Default,,0000,0000,0000,,then start writing tests for things, which\Nwere, any Dialogue: 0,0:09:28.50,0:09:29.98,Default,,0000,0000,0000,,part of the code base which we touched where Dialogue: 0,0:09:29.98,0:09:31.72,Default,,0000,0000,0000,,there were no tests, we started adding tests\Nthere. Dialogue: 0,0:09:31.72,0:09:33.90,Default,,0000,0000,0000,,You know, a bunch of different things. So\Nbasically, Dialogue: 0,0:09:33.90,0:09:36.24,Default,,0000,0000,0000,,like, the idea was to improve the coverage\Nand Dialogue: 0,0:09:36.24,0:09:39.62,Default,,0000,0000,0000,,keep on writing, right. So cool, so. And what Dialogue: 0,0:09:39.62,0:09:42.71,Default,,0000,0000,0000,,was the result? We ended up with, of course, Dialogue: 0,0:09:42.71,0:09:45.39,Default,,0000,0000,0000,,drastically improving our test coverage, so\Nwe were in Dialogue: 0,0:09:45.39,0:09:48.13,Default,,0000,0000,0000,,the late '90s for most the part of the Dialogue: 0,0:09:48.13,0:09:50.63,Default,,0000,0000,0000,,code base, which was awesome. Dialogue: 0,0:09:50.63,0:09:53.01,Default,,0000,0000,0000,,A.K.: A hundred, man, a hundred. Dialogue: 0,0:09:53.01,0:09:55.89,Default,,0000,0000,0000,,P.S.: A hundred, yeah. Or, yeah, sure. Dialogue: 0,0:09:55.89,0:10:00.07,Default,,0000,0000,0000,,Very good coverage. But things got only marginally\Nbetter. Dialogue: 0,0:10:00.07,0:10:02.20,Default,,0000,0000,0000,,At this point, this was when we realized that Dialogue: 0,0:10:02.20,0:10:04.26,Default,,0000,0000,0000,,inspite of putting so much effort into actually\Nimproving Dialogue: 0,0:10:04.26,0:10:07.00,Default,,0000,0000,0000,,our test coverage, our actual goal was to\Nactual Dialogue: 0,0:10:07.00,0:10:10.64,Default,,0000,0000,0000,,reduce the number of regression bugs. So we,\Nwe Dialogue: 0,0:10:10.64,0:10:13.50,Default,,0000,0000,0000,,were still no better than what we started\Noff, Dialogue: 0,0:10:13.50,0:10:17.24,Default,,0000,0000,0000,,about two months back. So the developers were\Ngenerally Dialogue: 0,0:10:17.24,0:10:19.58,Default,,0000,0000,0000,,very happy, now they were doing a lot more Dialogue: 0,0:10:19.58,0:10:22.36,Default,,0000,0000,0000,,TDD, they have a lot, they had manag- successfully Dialogue: 0,0:10:22.36,0:10:24.60,Default,,0000,0000,0000,,convinced the manag- you know the product\Nmanager and Dialogue: 0,0:10:24.60,0:10:27.59,Default,,0000,0000,0000,,the stake holders to spend more time on the Dialogue: 0,0:10:27.59,0:10:29.60,Default,,0000,0000,0000,,tech deck?? [00:10:29] and things like that.\NThey they Dialogue: 0,0:10:29.60,0:10:31.80,Default,,0000,0000,0000,,also were happy. But the project manager was\Nextremely Dialogue: 0,0:10:31.80,0:10:34.43,Default,,0000,0000,0000,,frustrated, because in spite of spending so\Nmuch effort, Dialogue: 0,0:10:34.43,0:10:37.43,Default,,0000,0000,0000,,there was no real benefit from any of it, Dialogue: 0,0:10:37.43,0:10:39.56,Default,,0000,0000,0000,,right. So it's like one of those very classic Dialogue: 0,0:10:39.56,0:10:41.73,Default,,0000,0000,0000,,moments where you know, in Dilbert where,\Nyou know, Dialogue: 0,0:10:41.73,0:10:45.03,Default,,0000,0000,0000,,the, OK, in Dilbert developers are never happy,\Nbut Dialogue: 0,0:10:45.03,0:10:47.08,Default,,0000,0000,0000,,at least here we were happy and the project Dialogue: 0,0:10:47.08,0:10:48.96,Default,,0000,0000,0000,,manager was sad, right. A.K.: And we weren't\Nhappy Dialogue: 0,0:10:48.96,0:10:49.87,Default,,0000,0000,0000,,with the project managers as well. Dialogue: 0,0:10:49.87,0:10:52.51,Default,,0000,0000,0000,,P.S.: Yeah, and eventually we feel there was\Nsomething wrong, Dialogue: 0,0:10:52.51,0:10:56.20,Default,,0000,0000,0000,,it's not like we take pleasure out of it.\NSo, we Dialogue: 0,0:10:56.20,0:10:58.63,Default,,0000,0000,0000,,think this is a very big mistake, where we Dialogue: 0,0:10:58.63,0:11:01.38,Default,,0000,0000,0000,,spent almost two months of time without really\Nrealizing Dialogue: 0,0:11:01.38,0:11:03.87,Default,,0000,0000,0000,,where we were going wrong, right. So this\Nmistake Dialogue: 0,0:11:03.87,0:11:07.49,Default,,0000,0000,0000,,and several mistakes across different projects\Nwhich Dejas won't Dialogue: 0,0:11:07.49,0:11:11.62,Default,,0000,0000,0000,,let us go into, ended up making us realize Dialogue: 0,0:11:11.62,0:11:15.77,Default,,0000,0000,0000,,something very basic, right. And that's, this\Nis basically Dialogue: 0,0:11:15.77,0:11:17.00,Default,,0000,0000,0000,,what, this is what we were going to say. Dialogue: 0,0:11:17.00,0:11:18.08,Default,,0000,0000,0000,,A.K.: OK, tell us a little bit. Dialogue: 0,0:11:18.08,0:11:20.70,Default,,0000,0000,0000,,P.S.: If we had like a lightning talk, this\Nis what Dialogue: 0,0:11:20.70,0:11:22.05,Default,,0000,0000,0000,,we probably the only thing we would have put Dialogue: 0,0:11:22.05,0:11:26.23,Default,,0000,0000,0000,,up and left. So never improve a metric. Solving Dialogue: 0,0:11:26.23,0:11:29.85,Default,,0000,0000,0000,,a problem should automatically imrpve the\Nmetric that you're Dialogue: 0,0:11:29.85,0:11:34.35,Default,,0000,0000,0000,,measuring, right. So the focus is on, is never Dialogue: 0,0:11:34.35,0:11:36.70,Default,,0000,0000,0000,,on making a metric better. It's always about\Nsolving Dialogue: 0,0:11:36.70,0:11:38.27,Default,,0000,0000,0000,,the problem. And, the metric- Dialogue: 0,0:11:38.27,0:11:38.69,Default,,0000,0000,0000,,A.K.: This is like Dialogue: 0,0:11:38.69,0:11:40.43,Default,,0000,0000,0000,,one of those, one of those things that is, Dialogue: 0,0:11:40.43,0:11:41.62,Default,,0000,0000,0000,,it's very easily said and- Dialogue: 0,0:11:41.62,0:11:42.08,Default,,0000,0000,0000,,P.S.: Yeah, and it- Dialogue: 0,0:11:42.08,0:11:43.48,Default,,0000,0000,0000,,A.K.: You have to, at least for us, we Dialogue: 0,0:11:43.48,0:11:45.07,Default,,0000,0000,0000,,always fell in that trap of- Dialogue: 0,0:11:45.07,0:11:45.90,Default,,0000,0000,0000,,P.S.: Yeah, like Dialogue: 0,0:11:45.90,0:11:48.48,Default,,0000,0000,0000,,it almost sounds like 'do the right thing,'\Nbut, Dialogue: 0,0:11:48.48,0:11:51.09,Default,,0000,0000,0000,,yeah, like, it's very, it fits your common\Nsense Dialogue: 0,0:11:51.09,0:11:52.67,Default,,0000,0000,0000,,very well, but then when you're caught up\Nin Dialogue: 0,0:11:52.67,0:11:55.00,Default,,0000,0000,0000,,the daily, the day-to-day stuff in what you\Ndo Dialogue: 0,0:11:55.00,0:11:57.03,Default,,0000,0000,0000,,in a project, it becomes very easy for you Dialogue: 0,0:11:57.03,0:11:59.43,Default,,0000,0000,0000,,to miss the point here. So yeah, like this Dialogue: 0,0:11:59.43,0:12:03.12,Default,,0000,0000,0000,,is really what, what is essence of what we Dialogue: 0,0:12:03.12,0:12:05.78,Default,,0000,0000,0000,,are trying to say, right. Dialogue: 0,0:12:05.78,0:12:08.19,Default,,0000,0000,0000,,A.K.: So, so what really happened here. Dialogue: 0,0:12:08.19,0:12:09.05,Default,,0000,0000,0000,,Let's go a little bit more Dialogue: 0,0:12:09.05,0:12:11.94,Default,,0000,0000,0000,,into what we were trying earlier and what\Nwe Dialogue: 0,0:12:11.94,0:12:14.77,Default,,0000,0000,0000,,think we should have probably done. Instead\Nof something Dialogue: 0,0:12:14.77,0:12:18.80,Default,,0000,0000,0000,,like this, which, which actually ended up\Nattacking the Dialogue: 0,0:12:18.80,0:12:23.28,Default,,0000,0000,0000,,symptoms, or you know, targeting the symptom,\Nwe want Dialogue: 0,0:12:23.28,0:12:25.43,Default,,0000,0000,0000,,to do something like this: There is a symptom, Dialogue: 0,0:12:25.43,0:12:26.36,Default,,0000,0000,0000,,so just like always- Dialogue: 0,0:12:26.36,0:12:27.48,Default,,0000,0000,0000,,P.S.: This is where the Dialogue: 0,0:12:27.48,0:12:29.57,Default,,0000,0000,0000,,whole, like, the pharmacist and the doctor\Napproach, yeah, Dialogue: 0,0:12:29.57,0:12:32.28,Default,,0000,0000,0000,,like, it's a very long-shot metaphor, we agree,\Nbut- Dialogue: 0,0:12:32.28,0:12:35.17,Default,,0000,0000,0000,,A.K.: The doctor thinking, which we hopefully\Nwant to Dialogue: 0,0:12:35.17,0:12:39.80,Default,,0000,0000,0000,,do, is first is just try and take a Dialogue: 0,0:12:39.80,0:12:41.34,Default,,0000,0000,0000,,guess at least at the problem, at least in Dialogue: 0,0:12:41.34,0:12:42.81,Default,,0000,0000,0000,,our context, maybe not the doctor's. But in\Nour Dialogue: 0,0:12:42.81,0:12:46.57,Default,,0000,0000,0000,,context, take a quess at the problem, right.\NThink Dialogue: 0,0:12:46.57,0:12:49.72,Default,,0000,0000,0000,,what it might be. Then that hopefully will\Ntell Dialogue: 0,0:12:49.72,0:12:52.23,Default,,0000,0000,0000,,you what you could do to probably solve the Dialogue: 0,0:12:52.23,0:12:55.32,Default,,0000,0000,0000,,problem, solve, you know, that could be the\Nsolution Dialogue: 0,0:12:55.32,0:12:59.23,Default,,0000,0000,0000,,which hope- will hopefully fix the problem,\Nright. So Dialogue: 0,0:12:59.23,0:13:01.74,Default,,0000,0000,0000,,this kind of very similar, we are iterating??[00:13:00]\Nover Dialogue: 0,0:13:01.74,0:13:05.38,Default,,0000,0000,0000,,this and hopefully, you know, improving on\Nwhat we Dialogue: 0,0:13:05.38,0:13:09.59,Default,,0000,0000,0000,,thought was the problem. And how do you know, Dialogue: 0,0:13:09.59,0:13:12.42,Default,,0000,0000,0000,,then, that you know we are in fact improving Dialogue: 0,0:13:12.42,0:13:13.87,Default,,0000,0000,0000,,on the problem? How do we know that is Dialogue: 0,0:13:13.87,0:13:13.90,Default,,0000,0000,0000,,the problem? Dialogue: 0,0:13:13.90,0:13:14.05,Default,,0000,0000,0000,,P.S.: Like the whole, how do you Dialogue: 0,0:13:14.05,0:13:14.65,Default,,0000,0000,0000,,define them, right. So, how do we define them? Dialogue: 0,0:13:14.65,0:13:17.90,Default,,0000,0000,0000,,A.K.: And that's where we think, that's where\Nwe Dialogue: 0,0:13:17.90,0:13:21.42,Default,,0000,0000,0000,,think the metrics come in. Again, not metric,\Nhopefully Dialogue: 0,0:13:21.42,0:13:24.41,Default,,0000,0000,0000,,metrics, because that lets us measure the\Nproblem. It Dialogue: 0,0:13:24.41,0:13:27.62,Default,,0000,0000,0000,,tells us at every point that, you know, you're Dialogue: 0,0:13:27.62,0:13:30.44,Default,,0000,0000,0000,,doing better, you know, it's improving. And\Nhopefully you Dialogue: 0,0:13:30.44,0:13:34.62,Default,,0000,0000,0000,,also, when it gets done, right. So, yeah.\NSo Dialogue: 0,0:13:34.62,0:13:36.70,Default,,0000,0000,0000,,this is, this is probably the approach that\Nwe Dialogue: 0,0:13:36.70,0:13:40.02,Default,,0000,0000,0000,,would like to try on, try from now on, Dialogue: 0,0:13:40.02,0:13:43.86,Default,,0000,0000,0000,,also. And, right, there, you know, the problem\Nmay Dialogue: 0,0:13:43.86,0:13:46.05,Default,,0000,0000,0000,,not be the, what is the one that we Dialogue: 0,0:13:46.05,0:13:48.40,Default,,0000,0000,0000,,started out to fix. Like, like, probably in\Nour Dialogue: 0,0:13:48.40,0:13:50.61,Default,,0000,0000,0000,,previous case, you know, it, you should always\Nbe Dialogue: 0,0:13:50.61,0:13:53.27,Default,,0000,0000,0000,,open to the idea that the problem will, what Dialogue: 0,0:13:53.27,0:13:54.99,Default,,0000,0000,0000,,you thought was the problem was never the\Ncase, Dialogue: 0,0:13:54.99,0:13:57.67,Default,,0000,0000,0000,,and it was not showing up. I mean, you Dialogue: 0,0:13:57.67,0:14:00.03,Default,,0000,0000,0000,,were trying to, you were seeing the metrics\Nimprove, Dialogue: 0,0:14:00.03,0:14:02.36,Default,,0000,0000,0000,,but then the symptom never went away, right.\NSo Dialogue: 0,0:14:02.36,0:14:04.04,Default,,0000,0000,0000,,be open to the notion that the problem could Dialogue: 0,0:14:04.04,0:14:06.52,Default,,0000,0000,0000,,be different, in which case, the important\Nthing is Dialogue: 0,0:14:06.52,0:14:09.17,Default,,0000,0000,0000,,the solution is different and the metrics\Nare different, Dialogue: 0,0:14:09.17,0:14:10.38,Default,,0000,0000,0000,,right. So yeah. Dialogue: 0,0:14:10.38,0:14:12.00,Default,,0000,0000,0000,,P.S.: Any guesses on what could Dialogue: 0,0:14:12.00,0:14:15.24,Default,,0000,0000,0000,,have been the problem on that project? Where\Nthe Dialogue: 0,0:14:15.24,0:14:20.46,Default,,0000,0000,0000,,regression bugs were written very high? It\Nwas duplication, Dialogue: 0,0:14:20.46,0:14:23.18,Default,,0000,0000,0000,,as in there was, like, rampant duplication\Nall over Dialogue: 0,0:14:23.18,0:14:26.27,Default,,0000,0000,0000,,the place. And we would change something but\Nforget Dialogue: 0,0:14:26.27,0:14:28.41,Default,,0000,0000,0000,,to change the same thing in some other place. Dialogue: 0,0:14:28.41,0:14:30.11,Default,,0000,0000,0000,,But, and because we didn't know about the\Ncode Dialogue: 0,0:14:30.11,0:14:33.61,Default,,0000,0000,0000,,base, yeah. We were just blindly adding tests.\NAnd Dialogue: 0,0:14:33.61,0:14:36.71,Default,,0000,0000,0000,,incrimentally going through different places,\Nwhere each place where Dialogue: 0,0:14:36.71,0:14:38.87,Default,,0000,0000,0000,,we found that there were no tests, we added Dialogue: 0,0:14:38.87,0:14:40.47,Default,,0000,0000,0000,,a test, right. But that didn't really help\Nus Dialogue: 0,0:14:40.47,0:14:42.87,Default,,0000,0000,0000,,with actually solving the problem of duplication.\NYeah. So- Dialogue: 0,0:14:42.87,0:14:44.73,Default,,0000,0000,0000,,A.K.: The coverage number is something which\Nis, it Dialogue: 0,0:14:44.73,0:14:47.30,Default,,0000,0000,0000,,easily drives you to just keep adding the\Nspecs, Dialogue: 0,0:14:47.30,0:14:50.21,Default,,0000,0000,0000,,and we will talk about, more about that soon. Dialogue: 0,0:14:50.21,0:14:53.44,Default,,0000,0000,0000,,P.S.: Yeah, so, if you really think about\Nit, Dialogue: 0,0:14:53.44,0:14:55.98,Default,,0000,0000,0000,,of, basically what, at least, we would love\Nto Dialogue: 0,0:14:55.98,0:14:59.49,Default,,0000,0000,0000,,believe that we have stopped doing this, right.\NSo Dialogue: 0,0:14:59.49,0:15:02.49,Default,,0000,0000,0000,,Yogi mentioned this in the panel discussion\Nyesterday, block-force Dialogue: 0,0:15:02.49,0:15:05.78,Default,,0000,0000,0000,,driven decisions, right. So that was really\Nwhat we Dialogue: 0,0:15:05.78,0:15:07.87,Default,,0000,0000,0000,,were doing, essentially. Like, we were a bunch\Nof Dialogue: 0,0:15:07.87,0:15:10.90,Default,,0000,0000,0000,,kids on this project, who'd see a problem\Nat Dialogue: 0,0:15:10.90,0:15:14.22,Default,,0000,0000,0000,,the first, the, at the first, trigger we would Dialogue: 0,0:15:14.22,0:15:17.40,Default,,0000,0000,0000,,just start crawling the web, start crawling\Nblock force, Dialogue: 0,0:15:17.40,0:15:20.60,Default,,0000,0000,0000,,see different github projects, find a gem,\Ninstall it, Dialogue: 0,0:15:20.60,0:15:23.27,Default,,0000,0000,0000,,start, like, monitoring it, measuring it,\Ntry to improve Dialogue: 0,0:15:23.27,0:15:25.51,Default,,0000,0000,0000,,it, you know. We don't really spending too\Nmuch Dialogue: 0,0:15:25.51,0:15:28.85,Default,,0000,0000,0000,,time into figuring out what was really the\Nproblem, Dialogue: 0,0:15:28.85,0:15:35.85,Default,,0000,0000,0000,,right. And, especially, so in, OK - where\Ndoes- Dialogue: 0,0:15:36.96,0:15:40.40,Default,,0000,0000,0000,,Especially so in Rails projects, where, you\Nknow, or Dialogue: 0,0:15:40.40,0:15:42.59,Default,,0000,0000,0000,,Ruby projects, where we believe that the number\Nof Dialogue: 0,0:15:42.59,0:15:46.80,Default,,0000,0000,0000,,gems which actually bundle best practices\Nis actually very Dialogue: 0,0:15:46.80,0:15:48.62,Default,,0000,0000,0000,,high, right. Here it's very easy for us to Dialogue: 0,0:15:48.62,0:15:50.60,Default,,0000,0000,0000,,fall into the trap of, OK, just choose a Dialogue: 0,0:15:50.60,0:15:53.36,Default,,0000,0000,0000,,gem, start using it, and then two months or Dialogue: 0,0:15:53.36,0:15:54.69,Default,,0000,0000,0000,,three months down the way you have no idea Dialogue: 0,0:15:54.69,0:15:56.59,Default,,0000,0000,0000,,where you used it in the first place. But Dialogue: 0,0:15:56.59,0:15:58.58,Default,,0000,0000,0000,,it's just there in your process, right. Yeah.\NLike Dialogue: 0,0:15:58.58,0:16:01.02,Default,,0000,0000,0000,,at least we used to find ourselves in that Dialogue: 0,0:16:01.02,0:16:04.60,Default,,0000,0000,0000,,trap all the time. So yeah. This is basically Dialogue: 0,0:16:04.60,0:16:08.20,Default,,0000,0000,0000,,what we stopped doing. OK, at this- Dialogue: 0,0:16:08.20,0:16:08.82,Default,,0000,0000,0000,,A.K.: [indecipherable] Dialogue: 0,0:16:08.82,0:16:10.74,Default,,0000,0000,0000,,P.S.: So this, this dude is basically Hari, Dialogue: 0,0:16:10.74,0:16:13.68,Default,,0000,0000,0000,,he's sitting way over there. Yesterday we\Nwere doing Dialogue: 0,0:16:13.68,0:16:16.60,Default,,0000,0000,0000,,a write-in??[00:16:14], and the only dude\Nthat, after this Dialogue: 0,0:16:16.60,0:16:18.81,Default,,0000,0000,0000,,point it's fine, but it's getting monotonous,\Nit's very Dialogue: 0,0:16:18.81,0:16:21.76,Default,,0000,0000,0000,,black and white. And you need more images.\NAnd, Dialogue: 0,0:16:21.76,0:16:24.69,Default,,0000,0000,0000,,like, Jake and I were really, we really think Dialogue: 0,0:16:24.69,0:16:24.96,Default,,0000,0000,0000,,that- Dialogue: 0,0:16:24.96,0:16:26.29,Default,,0000,0000,0000,,A.K.: That's our image, Hari! Dialogue: 0,0:16:26.29,0:16:28.72,Default,,0000,0000,0000,,P.S.: We really think that we don't know how\Nto add images Dialogue: 0,0:16:28.72,0:16:31.29,Default,,0000,0000,0000,,to a presentation. And we were like, OK fine Dialogue: 0,0:16:31.29,0:16:34.71,Default,,0000,0000,0000,,Hari, we'll just add your picture. And, yeah,\Nso Dialogue: 0,0:16:34.71,0:16:37.19,Default,,0000,0000,0000,,thanks for- and as you notice, we are very Dialogue: 0,0:16:37.19,0:16:38.85,Default,,0000,0000,0000,,receptive of feedback, so. Dialogue: 0,0:16:38.85,0:16:41.11,Default,,0000,0000,0000,,A.K.: He hasn't spoken yet, Dialogue: 0,0:16:41.11,0:16:42.25,Default,,0000,0000,0000,,but his is full of interesting ones. Dialogue: 0,0:16:42.25,0:16:44.96,Default,,0000,0000,0000,,P.S.: Like it would have been funny if like\Nhis was Dialogue: 0,0:16:44.96,0:16:46.65,Default,,0000,0000,0000,,the presentation before we got the schedule,\Nbut yeah, Dialogue: 0,0:16:46.65,0:16:51.08,Default,,0000,0000,0000,,anyway. He'll be talking next. So yeah, when\Nyou Dialogue: 0,0:16:51.08,0:16:53.28,Default,,0000,0000,0000,,look at test coverage, right, how many of\Nyou Dialogue: 0,0:16:53.28,0:16:59.01,Default,,0000,0000,0000,,think you understand test coverage very well?\NWell enough. Dialogue: 0,0:16:59.01,0:17:03.97,Default,,0000,0000,0000,,OK, I mean, sure, yeah, like- Dialogue: 0,0:17:03.97,0:17:07.51,Default,,0000,0000,0000,,A.K.: This was one thing which at least took\Nus as a Dialogue: 0,0:17:07.51,0:17:10.42,Default,,0000,0000,0000,,very obvious metrics thing, which we always\Nget into, Dialogue: 0,0:17:10.42,0:17:10.61,Default,,0000,0000,0000,,and- Dialogue: 0,0:17:10.61,0:17:12.25,Default,,0000,0000,0000,,P.S.: When we were young and stupid as Dialogue: 0,0:17:12.25,0:17:14.30,Default,,0000,0000,0000,,against now old and stupid, right, we were,\Nwe Dialogue: 0,0:17:14.30,0:17:16.50,Default,,0000,0000,0000,,used to think oh, test coverage, what's that,\Nit's Dialogue: 0,0:17:16.50,0:17:18.80,Default,,0000,0000,0000,,just - meh. It's so easy, right. But then Dialogue: 0,0:17:18.80,0:17:21.84,Default,,0000,0000,0000,,we realized even something so seemingly obvious\Nhad, like, Dialogue: 0,0:17:21.84,0:17:25.06,Default,,0000,0000,0000,,so many different shades of details. And once\Nyou Dialogue: 0,0:17:25.06,0:17:27.67,Default,,0000,0000,0000,,start understanding it and interpreting it\Nin context is Dialogue: 0,0:17:27.67,0:17:32.03,Default,,0000,0000,0000,,when you really understand the, the complexity\Nof that, Dialogue: 0,0:17:32.03,0:17:35.98,Default,,0000,0000,0000,,of that thing that you're measuring, right.\NNow think Dialogue: 0,0:17:35.98,0:17:38.41,Default,,0000,0000,0000,,of all the things that people at Flipkart\Nmeasure. Dialogue: 0,0:17:38.41,0:17:40.82,Default,,0000,0000,0000,,I don't even know if they have a rational Dialogue: 0,0:17:40.82,0:17:43.94,Default,,0000,0000,0000,,behind every one of it. I'm hoping they do, Dialogue: 0,0:17:43.94,0:17:46.13,Default,,0000,0000,0000,,but you know like, it becomes very OK, we Dialogue: 0,0:17:46.13,0:17:48.24,Default,,0000,0000,0000,,just need to monitor these ten things. Why?\NWhy Dialogue: 0,0:17:48.24,0:17:51.08,Default,,0000,0000,0000,,are you doing it? Right. So it should not Dialogue: 0,0:17:51.08,0:17:52.94,Default,,0000,0000,0000,,be like a checklist at every project on start. Dialogue: 0,0:17:52.94,0:17:55.52,Default,,0000,0000,0000,,You just start using it. So yeah, test coverage Dialogue: 0,0:17:55.52,0:17:57.78,Default,,0000,0000,0000,,is definitely one thing that we found where,\Non Dialogue: 0,0:17:57.78,0:17:59.06,Default,,0000,0000,0000,,start of every project we just set up a Dialogue: 0,0:17:59.06,0:18:01.35,Default,,0000,0000,0000,,coverage tool. We just wanted to talk about\Nsome Dialogue: 0,0:18:01.35,0:18:04.45,Default,,0000,0000,0000,,details on what we learned when doing that,\Nso Dialogue: 0,0:18:04.45,0:18:05.31,Default,,0000,0000,0000,,yeah. Dialogue: 0,0:18:05.31,0:18:07.33,Default,,0000,0000,0000,,A.K.: So first we want to start off Dialogue: 0,0:18:07.33,0:18:11.85,Default,,0000,0000,0000,,the obvious one. The measuring. So controller\Nspecs versus Dialogue: 0,0:18:11.85,0:18:15.99,Default,,0000,0000,0000,,model specs coverage. I- I'm guessing it,\Ndoes it Dialogue: 0,0:18:15.99,0:18:20.99,Default,,0000,0000,0000,,ring any bells? I'm- so, so I'm, think of Dialogue: 0,0:18:20.99,0:18:23.52,Default,,0000,0000,0000,,it this way, like, he has a question for Dialogue: 0,0:18:23.52,0:18:27.32,Default,,0000,0000,0000,,you, right? You have, let's take a simple\Ncase. Dialogue: 0,0:18:27.32,0:18:29.19,Default,,0000,0000,0000,,There is a single controller, you have a spec Dialogue: 0,0:18:29.19,0:18:32.09,Default,,0000,0000,0000,,around it, there's a corresponding module,\Nyou have a Dialogue: 0,0:18:32.09,0:18:34.28,Default,,0000,0000,0000,,spec around it, right. And then, you, with\Nthese Dialogue: 0,0:18:34.28,0:18:35.33,Default,,0000,0000,0000,,two tests you run your coverage, right. Dialogue: 0,0:18:35.33,0:18:36.65,Default,,0000,0000,0000,,P.S.: And you get some coverage from- Dialogue: 0,0:18:36.65,0:18:39.06,Default,,0000,0000,0000,,A.K.: I'm guessing it's going to be a hundred\Npercent. Dialogue: 0,0:18:39.06,0:18:43.78,Default,,0000,0000,0000,,P.S.: Do you see a problem with this? Could\Nthere, rather, OK, Dialogue: 0,0:18:43.78,0:18:49.32,Default,,0000,0000,0000,,could there be a problem with this? Dialogue: 0,0:18:49.32,0:18:53.67,Default,,0000,0000,0000,,A.K.: What if you just removed the model spec? Dialogue: 0,0:18:53.67,0:18:56.96,Default,,0000,0000,0000,,P.S.: What will the coverage for model be?\NIs there a Dialogue: 0,0:18:56.96,0:19:01.57,Default,,0000,0000,0000,,chance that model's coverage is not zero? Dialogue: 0,0:19:01.57,0:19:04.57,Default,,0000,0000,0000,,A.K.: Your controller spec is still gonna\Nbe loading the model. Dialogue: 0,0:19:04.57,0:19:05.05,Default,,0000,0000,0000,,So your coverage- Dialogue: 0,0:19:05.05,0:19:05.52,Default,,0000,0000,0000,,P.S.: Depends on- Dialogue: 0,0:19:05.52,0:19:06.31,Default,,0000,0000,0000,,A.K.: -is still in question. Dialogue: 0,0:19:06.31,0:19:08.14,Default,,0000,0000,0000,,P.S.: The answer is it depends, right, Dialogue: 0,0:19:08.14,0:19:09.95,Default,,0000,0000,0000,,like, really depends on how you are testing\Nyour Dialogue: 0,0:19:09.95,0:19:11.73,Default,,0000,0000,0000,,controller. But most of all things, what we\Nhave Dialogue: 0,0:19:11.73,0:19:14.41,Default,,0000,0000,0000,,seen is, not every model is mocked out in Dialogue: 0,0:19:14.41,0:19:17.17,Default,,0000,0000,0000,,the controller. Well, it's a totally different\Ndebate, whether Dialogue: 0,0:19:17.17,0:19:19.98,Default,,0000,0000,0000,,should you mock your models or not, but if Dialogue: 0,0:19:19.98,0:19:22.63,Default,,0000,0000,0000,,you are not modelin- or, mocking, your models\Nare Dialogue: 0,0:19:22.63,0:19:25.33,Default,,0000,0000,0000,,being loaded in your controller. So the controller\Nspec, Dialogue: 0,0:19:25.33,0:19:27.79,Default,,0000,0000,0000,,when it is tested for, like when the coverage Dialogue: 0,0:19:27.79,0:19:31.29,Default,,0000,0000,0000,,is reported your models are being reported\Nas well. Dialogue: 0,0:19:31.29,0:19:33.76,Default,,0000,0000,0000,,A.K.: While, while the, or the point of, the Dialogue: 0,0:19:33.76,0:19:35.60,Default,,0000,0000,0000,,point we are trying to make is, here, is Dialogue: 0,0:19:35.60,0:19:37.92,Default,,0000,0000,0000,,not whether you should, how you should test\Nyour Dialogue: 0,0:19:37.92,0:19:41.57,Default,,0000,0000,0000,,model specs and controller specs. What we\Ndo implore Dialogue: 0,0:19:41.57,0:19:44.22,Default,,0000,0000,0000,,you to do is make sure that when you're Dialogue: 0,0:19:44.22,0:19:45.99,Default,,0000,0000,0000,,doing, when you're looking at your coverage,\Nyou do Dialogue: 0,0:19:45.99,0:19:48.35,Default,,0000,0000,0000,,have in mind your testing strategy, which\Nis, am Dialogue: 0,0:19:48.35,0:19:50.55,Default,,0000,0000,0000,,I actually mocking the model out or is it Dialogue: 0,0:19:50.55,0:19:52.98,Default,,0000,0000,0000,,also getting wrote as a part of my controller Dialogue: 0,0:19:52.98,0:19:54.88,Default,,0000,0000,0000,,spec? Is my controller spec also hitting the\Nmodels, Dialogue: 0,0:19:54.88,0:19:57.17,Default,,0000,0000,0000,,right? Think about these things when, when\Nyou're looking Dialogue: 0,0:19:57.17,0:20:00.06,Default,,0000,0000,0000,,at these numbers, right. Or something that\Nworked for Dialogue: 0,0:20:00.06,0:20:02.18,Default,,0000,0000,0000,,us which we tried to do was we started Dialogue: 0,0:20:02.18,0:20:05.73,Default,,0000,0000,0000,,monitoring the model specs coverage independently,\Nand then started Dialogue: 0,0:20:05.73,0:20:12.54,Default,,0000,0000,0000,,looking at the controller specs in light of\Nthe, Dialogue: 0,0:20:12.54,0:20:14.47,Default,,0000,0000,0000,,in light of the model spec coverage. We wanted Dialogue: 0,0:20:14.47,0:20:16.82,Default,,0000,0000,0000,,the model spec coverage to be high, because\Nat Dialogue: 0,0:20:16.82,0:20:19.65,Default,,0000,0000,0000,,least we wanted all, hopefully all our business\Nlogic Dialogue: 0,0:20:19.65,0:20:22.59,Default,,0000,0000,0000,,was in the model specs, and you know, that's Dialogue: 0,0:20:22.59,0:20:28.96,Default,,0000,0000,0000,,what we were keen on. Yes. Yeah, and then Dialogue: 0,0:20:28.96,0:20:31.59,Default,,0000,0000,0000,,the next one, the line coverage itself, I\Nthink Dialogue: 0,0:20:31.59,0:20:33.32,Default,,0000,0000,0000,,most commonly when we talk about coverage\Nwe just Dialogue: 0,0:20:33.32,0:20:35.42,Default,,0000,0000,0000,,talk about line coverage. But then there is\Na Dialogue: 0,0:20:35.42,0:20:38.08,Default,,0000,0000,0000,,bunch of other things as well, branch coverage,\Nand Dialogue: 0,0:20:38.08,0:20:39.83,Default,,0000,0000,0000,,then unique path coverage. Dialogue: 0,0:20:39.83,0:20:40.71,Default,,0000,0000,0000,,P.S.: How many of you Dialogue: 0,0:20:40.71,0:20:42.24,Default,,0000,0000,0000,,pay attention to branch coverages? Dialogue: 0,0:20:42.24,0:20:44.73,Default,,0000,0000,0000,,A.K.: Or even monitor it? Dialogue: 0,0:20:44.73,0:20:46.85,Default,,0000,0000,0000,,P.S.: How many of you don't think it's Dialogue: 0,0:20:46.85,0:20:52.69,Default,,0000,0000,0000,,important? How many of you have no opinions?\NCool. Dialogue: 0,0:20:52.69,0:20:58.19,Default,,0000,0000,0000,,Yeah. I mean, sure. We have it on projects Dialogue: 0,0:20:58.19,0:21:00.69,Default,,0000,0000,0000,,where it's been important, it's not been important,\Nit's Dialogue: 0,0:21:00.69,0:21:02.74,Default,,0000,0000,0000,,fine. But it's just that, you just need to Dialogue: 0,0:21:02.74,0:21:05.83,Default,,0000,0000,0000,,know that it exists, and you need to train Dialogue: 0,0:21:05.83,0:21:07.57,Default,,0000,0000,0000,,your data, right, so. Dialogue: 0,0:21:07.57,0:21:08.59,Default,,0000,0000,0000,,A.K.: Just, hopefully it should Dialogue: 0,0:21:08.59,0:21:11.81,Default,,0000,0000,0000,,not be a single metric. Something usually\Nseems wrong Dialogue: 0,0:21:11.81,0:21:13.02,Default,,0000,0000,0000,,if it is just gonna be about that one Dialogue: 0,0:21:13.02,0:21:19.08,Default,,0000,0000,0000,,metric. Next one. So reporting. Yeah, this\None is Dialogue: 0,0:21:19.08,0:21:21.39,Default,,0000,0000,0000,,a bit tricky. What I usually don't like about Dialogue: 0,0:21:21.39,0:21:24.48,Default,,0000,0000,0000,,coverage tools and these tools in general\Nis they Dialogue: 0,0:21:24.48,0:21:26.93,Default,,0000,0000,0000,,sometimes miss out this aspect of it. And\Nthey, Dialogue: 0,0:21:26.93,0:21:28.49,Default,,0000,0000,0000,,in an attempt to try and be nice to Dialogue: 0,0:21:28.49,0:21:30.82,Default,,0000,0000,0000,,you when you are very simple answered is try Dialogue: 0,0:21:30.82,0:21:32.81,Default,,0000,0000,0000,,and give you a number which inherently makes\Nit Dialogue: 0,0:21:32.81,0:21:36.07,Default,,0000,0000,0000,,good or bad. There's nothing in between, and\Nthen Dialogue: 0,0:21:36.07,0:21:38.96,Default,,0000,0000,0000,,the focus is lost. Like you either start liking Dialogue: 0,0:21:38.96,0:21:41.34,Default,,0000,0000,0000,,it or you don't like it. You don't really Dialogue: 0,0:21:41.34,0:21:46.15,Default,,0000,0000,0000,,think about what is there in between, right.\NYeah. Dialogue: 0,0:21:46.15,0:21:47.95,Default,,0000,0000,0000,,So the focus on, focus on some of the Dialogue: 0,0:21:47.95,0:21:49.50,Default,,0000,0000,0000,,aspects of where is the coverage, you know,\Nwhat Dialogue: 0,0:21:49.50,0:21:51.91,Default,,0000,0000,0000,,does it mean, right. One thing that worked\Nfor Dialogue: 0,0:21:51.91,0:21:55.11,Default,,0000,0000,0000,,us was code climate in the region projects.\NI Dialogue: 0,0:21:55.11,0:21:56.99,Default,,0000,0000,0000,,really like it because they put a lot of Dialogue: 0,0:21:56.99,0:21:59.70,Default,,0000,0000,0000,,focus into the presentation aspect of it.\NNot just Dialogue: 0,0:21:59.70,0:22:03.18,Default,,0000,0000,0000,,the collection aspect of it. It really, you\Nknow, Dialogue: 0,0:22:03.18,0:22:06.93,Default,,0000,0000,0000,,takes you down to the, to the code, which Dialogue: 0,0:22:06.93,0:22:09.65,Default,,0000,0000,0000,,is missing the specs. Of course, they do also Dialogue: 0,0:22:09.65,0:22:11.94,Default,,0000,0000,0000,,other metrics like code quality, which I really\Nlike, Dialogue: 0,0:22:11.94,0:22:14.49,Default,,0000,0000,0000,,by the way. They have some notification things\Nlike Dialogue: 0,0:22:14.49,0:22:17.11,Default,,0000,0000,0000,,that, like, on, like Lexus a lot, whenever\Nthis Dialogue: 0,0:22:17.11,0:22:19.17,Default,,0000,0000,0000,,climate goes in, poof the coverage goes down\Nor Dialogue: 0,0:22:19.17,0:22:21.02,Default,,0000,0000,0000,,something like that. [00:22:19] It doesn't\Nbreak the builder Dialogue: 0,0:22:21.02,0:22:23.60,Default,,0000,0000,0000,,part, it doesn't break the build, but it lets Dialogue: 0,0:22:23.60,0:22:25.08,Default,,0000,0000,0000,,you know, and then you can deal with it Dialogue: 0,0:22:25.08,0:22:27.11,Default,,0000,0000,0000,,if you think it is important to deal with. Dialogue: 0,0:22:27.11,0:22:30.39,Default,,0000,0000,0000,,P.S.: OK, speaking of breaking build, how\Nmany of Dialogue: 0,0:22:30.39,0:22:35.86,Default,,0000,0000,0000,,you know what racheting, in builds? OK. So\Nthe Dialogue: 0,0:22:35.86,0:22:37.100,Default,,0000,0000,0000,,idea of racheting is basically you will never\Nleave Dialogue: 0,0:22:37.100,0:22:41.10,Default,,0000,0000,0000,,your code base worse than what it already\Nwas, Dialogue: 0,0:22:41.10,0:22:45.06,Default,,0000,0000,0000,,right. So every commit basically makes sure,\Neven if Dialogue: 0,0:22:45.06,0:22:46.76,Default,,0000,0000,0000,,it doesn't do any good, it doesn't do any Dialogue: 0,0:22:46.76,0:22:48.78,Default,,0000,0000,0000,,bad to your code base. So for example, if Dialogue: 0,0:22:48.78,0:22:51.86,Default,,0000,0000,0000,,you're, your current code coverage is at 70%,\Nand Dialogue: 0,0:22:51.86,0:22:53.84,Default,,0000,0000,0000,,if this check-in makes it 69%, it will break Dialogue: 0,0:22:53.84,0:22:56.31,Default,,0000,0000,0000,,the build. Even though there's nothing functionally\Nwrong with Dialogue: 0,0:22:56.31,0:23:00.17,Default,,0000,0000,0000,,it, you know, it's bad, right. We really think Dialogue: 0,0:23:00.17,0:23:02.60,Default,,0000,0000,0000,,it's a double-edged sword. I will, this is\None Dialogue: 0,0:23:02.60,0:23:05.25,Default,,0000,0000,0000,,of those things which I have a, in theory Dialogue: 0,0:23:05.25,0:23:08.63,Default,,0000,0000,0000,,sounds very, very good, and direct, but in\Npractice, Dialogue: 0,0:23:08.63,0:23:10.95,Default,,0000,0000,0000,,what it typically ends up doing is people\Nend Dialogue: 0,0:23:10.95,0:23:14.54,Default,,0000,0000,0000,,up fretting the actual metric, and never about\Nwhat Dialogue: 0,0:23:14.54,0:23:17.57,Default,,0000,0000,0000,,the problem is, right. Becau- this exactly\Ndoes what Dialogue: 0,0:23:17.57,0:23:20.45,Default,,0000,0000,0000,,we said in the previous slide, which is coverage Dialogue: 0,0:23:20.45,0:23:24.03,Default,,0000,0000,0000,,is never red or green, right. Sometimes you\Nare Dialogue: 0,0:23:24.03,0:23:26.36,Default,,0000,0000,0000,,OK with taking this hit because you want to Dialogue: 0,0:23:26.36,0:23:28.86,Default,,0000,0000,0000,,do something. I mean there are all, there\Nare Dialogue: 0,0:23:28.86,0:23:33.72,Default,,0000,0000,0000,,so many reasons why which, in practic- in\Nreality Dialogue: 0,0:23:33.72,0:23:35.85,Default,,0000,0000,0000,,you may have to do some bad things, and Dialogue: 0,0:23:35.85,0:23:37.51,Default,,0000,0000,0000,,eventually have to pay for it, but it's OK, Dialogue: 0,0:23:37.51,0:23:40.69,Default,,0000,0000,0000,,it's a conscious decision, right. But racheting\Ninvariably stops Dialogue: 0,0:23:40.69,0:23:44.76,Default,,0000,0000,0000,,that. It makes it very, you know, black and Dialogue: 0,0:23:44.76,0:23:45.47,Default,,0000,0000,0000,,white, right. Dialogue: 0,0:23:45.47,0:23:47.31,Default,,0000,0000,0000,,A.K.: Difficult for you to proceed at Dialogue: 0,0:23:47.31,0:23:47.87,Default,,0000,0000,0000,,that very moment. Dialogue: 0,0:23:47.87,0:23:49.37,Default,,0000,0000,0000,,P.S.: Yeah and it has a Dialogue: 0,0:23:49.37,0:23:53.38,Default,,0000,0000,0000,,more behavioral impact on the team, which\Nis your, Dialogue: 0,0:23:53.38,0:23:56.85,Default,,0000,0000,0000,,your team members start hating either the\Nracheting, or Dialogue: 0,0:23:56.85,0:24:00.26,Default,,0000,0000,0000,,they start hating the metric, or you know,\Nwe Dialogue: 0,0:24:00.26,0:24:03.80,Default,,0000,0000,0000,,had this one person who did not commit for Dialogue: 0,0:24:03.80,0:24:06.13,Default,,0000,0000,0000,,four days because they thought they did not\Nhave Dialogue: 0,0:24:06.13,0:24:09.30,Default,,0000,0000,0000,,enough test coverage. And, like, when we breached\Nthe Dialogue: 0,0:24:09.30,0:24:12.35,Default,,0000,0000,0000,,whole, OK, frequent check-ins, call check-in,\Nand this person Dialogue: 0,0:24:12.35,0:24:14.39,Default,,0000,0000,0000,,was actually scared because they were about,\Nthey would Dialogue: 0,0:24:14.39,0:24:17.60,Default,,0000,0000,0000,,break the build, is actually a, very, very\Nbad Dialogue: 0,0:24:17.60,0:24:20.73,Default,,0000,0000,0000,,signal, of, a bad sign from your team, right. Dialogue: 0,0:24:20.73,0:24:22.69,Default,,0000,0000,0000,,Now well, you can always argue, OK, this person Dialogue: 0,0:24:22.69,0:24:25.14,Default,,0000,0000,0000,,totally missed the point, we can say a bunch Dialogue: 0,0:24:25.14,0:24:27.50,Default,,0000,0000,0000,,of things, right, but this is the reality.\NSo Dialogue: 0,0:24:27.50,0:24:29.74,Default,,0000,0000,0000,,we think that it's a good idea, so that Dialogue: 0,0:24:29.74,0:24:32.04,Default,,0000,0000,0000,,you might want to do it at certain points Dialogue: 0,0:24:32.04,0:24:35.23,Default,,0000,0000,0000,,in time. But yeah, be very, very careful about Dialogue: 0,0:24:35.23,0:24:37.73,Default,,0000,0000,0000,,the freakanomic implication that it has on\Nyour team, Dialogue: 0,0:24:37.73,0:24:38.08,Default,,0000,0000,0000,,right, always keep that in mind. Dialogue: 0,0:24:38.08,0:24:40.42,Default,,0000,0000,0000,,A.K.: And then Dialogue: 0,0:24:40.42,0:24:43.27,Default,,0000,0000,0000,,the very other popular thing, which is, you\Njust Dialogue: 0,0:24:43.27,0:24:46.11,Default,,0000,0000,0000,,write that test to bump up the coverage, if Dialogue: 0,0:24:46.11,0:24:46.68,Default,,0000,0000,0000,,you're not just- Dialogue: 0,0:24:46.68,0:24:47.31,Default,,0000,0000,0000,,P.S.: Yeah, so there was, there Dialogue: 0,0:24:47.31,0:24:49.77,Default,,0000,0000,0000,,was just one more philosophy of full-on coverage??\N[00:24:50], Dialogue: 0,0:24:49.77,0:24:52.43,Default,,0000,0000,0000,,which is saying, OK, you just checked-in code,\Nbut Dialogue: 0,0:24:52.43,0:24:54.25,Default,,0000,0000,0000,,you don't have a test for this, but that's Dialogue: 0,0:24:54.25,0:24:56.67,Default,,0000,0000,0000,,OK. There's this other class which does not\Nhave Dialogue: 0,0:24:56.67,0:24:58.67,Default,,0000,0000,0000,,a test for it, which is easy, so let's Dialogue: 0,0:24:58.67,0:25:01.48,Default,,0000,0000,0000,,start this there and keep my coverage maintained\Nright Dialogue: 0,0:25:01.48,0:25:04.05,Default,,0000,0000,0000,,there. There's so many, like, weird things\Npeople end Dialogue: 0,0:25:04.05,0:25:06.39,Default,,0000,0000,0000,,up doing, just because they are now worried\Nabout Dialogue: 0,0:25:06.39,0:25:09.12,Default,,0000,0000,0000,,coverage and not really worried about what\Nit means Dialogue: 0,0:25:09.12,0:25:11.47,Default,,0000,0000,0000,,to- you know, what it means with what they Dialogue: 0,0:25:11.47,0:25:12.42,Default,,0000,0000,0000,,are doing, right. So it's- Dialogue: 0,0:25:12.42,0:25:14.76,Default,,0000,0000,0000,,is done with the best of intentions, but then Dialogue: 0,0:25:14.76,0:25:16.75,Default,,0000,0000,0000,,you get really, really bad, cause, like- Dialogue: 0,0:25:16.75,0:25:17.32,Default,,0000,0000,0000,,P.S.: Yeah. Dialogue: 0,0:25:17.32,0:25:19.88,Default,,0000,0000,0000,,So, OK, how, how did we go, I mean, Dialogue: 0,0:25:19.88,0:25:22.44,Default,,0000,0000,0000,,how do we now improve, like, so we still Dialogue: 0,0:25:22.44,0:25:25.64,Default,,0000,0000,0000,,take on a lot of projects, customer, we are, Dialogue: 0,0:25:25.64,0:25:27.60,Default,,0000,0000,0000,,we are mainly now in consulting, so we do Dialogue: 0,0:25:27.60,0:25:29.89,Default,,0000,0000,0000,,end up taking worker code bases, right. So\Nwhat Dialogue: 0,0:25:29.89,0:25:32.39,Default,,0000,0000,0000,,do we do to improve coverage if we have Dialogue: 0,0:25:32.39,0:25:34.69,Default,,0000,0000,0000,,a bad one? One thing we realized is adding Dialogue: 0,0:25:34.69,0:25:37.95,Default,,0000,0000,0000,,unit tests to classes, existing classes, could\Nbe a Dialogue: 0,0:25:37.95,0:25:41.20,Default,,0000,0000,0000,,very dangerous thing, right. What that essentially\Nmeans, is Dialogue: 0,0:25:41.20,0:25:43.37,Default,,0000,0000,0000,,you have, you know, you are cementing the\Ncurrent Dialogue: 0,0:25:43.37,0:25:46.38,Default,,0000,0000,0000,,design. Now I won't say, like prejudiously,\Nit might Dialogue: 0,0:25:46.38,0:25:48.64,Default,,0000,0000,0000,,be bad to say not a good design, right. Dialogue: 0,0:25:48.64,0:25:50.99,Default,,0000,0000,0000,,But you are cementing it, right. If ever you Dialogue: 0,0:25:50.99,0:25:54.47,Default,,0000,0000,0000,,want to cement something, cement features.\NCement functionality, right. Dialogue: 0,0:25:54.47,0:25:56.53,Default,,0000,0000,0000,,Which means you might want to write like a Dialogue: 0,0:25:56.53,0:26:00.06,Default,,0000,0000,0000,,much higher level test of, and, you know,\Nensure Dialogue: 0,0:26:00.06,0:26:01.80,Default,,0000,0000,0000,,that the functionality is the same, so that\Nyou Dialogue: 0,0:26:01.80,0:26:04.24,Default,,0000,0000,0000,,can go and refactor later. On this one project, Dialogue: 0,0:26:04.24,0:26:07.01,Default,,0000,0000,0000,,which Yogi, me, and Jake worked together on\Nin Dialogue: 0,0:26:07.01,0:26:11.47,Default,,0000,0000,0000,,ThoughtWorks, it worked beautifully for us,\Nwhere we were Dialogue: 0,0:26:11.47,0:26:15.88,Default,,0000,0000,0000,,strangling ?? to Hibernate [00:26:14]. Which\Nmeant that all Dialogue: 0,0:26:15.88,0:26:18.84,Default,,0000,0000,0000,,that entire unit tests and database level\Ntests were Dialogue: 0,0:26:18.84,0:26:21.96,Default,,0000,0000,0000,,completely invalidated, they were useless,\Nright. And because of Dialogue: 0,0:26:21.96,0:26:24.31,Default,,0000,0000,0000,,the way, and because we wanted to turn on Dialogue: 0,0:26:24.31,0:26:26.47,Default,,0000,0000,0000,,to caches?? [00:26:24], transactions changed.\NLike that meant the Dialogue: 0,0:26:26.47,0:26:30.10,Default,,0000,0000,0000,,whole app was rendered useless from a testing\Npoint Dialogue: 0,0:26:30.10,0:26:31.36,Default,,0000,0000,0000,,of view, right, from a safety net point of Dialogue: 0,0:26:31.36,0:26:34.98,Default,,0000,0000,0000,,view. But what came to our help was controller Dialogue: 0,0:26:34.98,0:26:38.29,Default,,0000,0000,0000,,and beyond level tests. So our biggest, we\Nhad Dialogue: 0,0:26:38.29,0:26:40.93,Default,,0000,0000,0000,,such good coverage there, that we went in\Nand Dialogue: 0,0:26:40.93,0:26:42.99,Default,,0000,0000,0000,,we just modified a whole bunch of things,\Nand Dialogue: 0,0:26:42.99,0:26:45.40,Default,,0000,0000,0000,,we like started deleting tests, you know.\NYou get Dialogue: 0,0:26:45.40,0:26:48.29,Default,,0000,0000,0000,,a lot more flexibility and freedom inside\Nyour code Dialogue: 0,0:26:48.29,0:26:49.84,Default,,0000,0000,0000,,base when you know that you're not breaking\Nany Dialogue: 0,0:26:49.84,0:26:53.21,Default,,0000,0000,0000,,functionality. So yeah like it's a really,\Nreally, like, Dialogue: 0,0:26:53.21,0:26:55.57,Default,,0000,0000,0000,,good thing, so definitely think about it when\Nyou're Dialogue: 0,0:26:55.57,0:26:57.23,Default,,0000,0000,0000,,inheriting a legacy codebase. Dialogue: 0,0:26:57.23,0:26:58.67,Default,,0000,0000,0000,,A.K.: Unit tests, unit tests Dialogue: 0,0:26:58.67,0:27:01.28,Default,,0000,0000,0000,,are great, but do keep in mind that they Dialogue: 0,0:27:01.28,0:27:03.03,Default,,0000,0000,0000,,might also come in the way of- Dialogue: 0,0:27:03.03,0:27:03.62,Default,,0000,0000,0000,,P.S.: Changes. Dialogue: 0,0:27:03.62,0:27:04.49,Default,,0000,0000,0000,,A.K.: Refactoring, and changes. Dialogue: 0,0:27:04.49,0:27:04.91,Default,,0000,0000,0000,,P.S.: Yeah. Dialogue: 0,0:27:04.91,0:27:05.90,Default,,0000,0000,0000,,A.K.: Big, big refactoring- Dialogue: 0,0:27:05.90,0:27:07.74,Default,,0000,0000,0000,,P.S.: So, OK. What - the whole measurement Dialogue: 0,0:27:07.74,0:27:11.40,Default,,0000,0000,0000,,reporting, racheting, improvement, all of\Nthis is basically saying, Dialogue: 0,0:27:11.40,0:27:13.28,Default,,0000,0000,0000,,always keep the problem you're solving in\Nmind, right. Dialogue: 0,0:27:13.28,0:27:15.74,Default,,0000,0000,0000,,Rachet don't rachet - how do you decide? Well, Dialogue: 0,0:27:15.74,0:27:17.95,Default,,0000,0000,0000,,is it helping you to achieve your goal, or Dialogue: 0,0:27:17.95,0:27:20.46,Default,,0000,0000,0000,,the problem you have at hand? Sure, you know, Dialogue: 0,0:27:20.46,0:27:26.50,Default,,0000,0000,0000,,so do it. Otherwise don't do it, right. It's- Dialogue: 0,0:27:26.50,0:27:27.25,Default,,0000,0000,0000,,Yeah. Dialogue: 0,0:27:27.25,0:27:28.66,Default,,0000,0000,0000,,A.K.: I think- Dialogue: 0,0:27:28.66,0:27:29.100,Default,,0000,0000,0000,,P.S.: So, the second- Dialogue: 0,0:27:29.100,0:27:30.67,Default,,0000,0000,0000,,A.K.: Let's- Dialogue: 0,0:27:30.67,0:27:33.35,Default,,0000,0000,0000,,P.S.: -anecdote- I'll just be, quickly talk\Nabout- Dialogue: 0,0:27:33.35,0:27:35.36,Default,,0000,0000,0000,,A.K.: We have five minutes, so- Dialogue: 0,0:27:35.36,0:27:36.36,Default,,0000,0000,0000,,P.S.: Yeah, like, Dialogue: 0,0:27:36.36,0:27:37.37,Default,,0000,0000,0000,,the second anecdote was basically, OK, we\Nhad this Dialogue: 0,0:27:37.37,0:27:42.49,Default,,0000,0000,0000,,server which was under a very heavy load.\NAnd, Dialogue: 0,0:27:42.49,0:27:48.63,Default,,0000,0000,0000,,like thousands of requests, a minute, and\Nonly about Dialogue: 0,0:27:48.63,0:27:52.32,Default,,0000,0000,0000,,5% of those requests, in very seemingly arbitrary\Nperiods Dialogue: 0,0:27:52.32,0:27:56.34,Default,,0000,0000,0000,,of times, and arbirtrary controllers and actions,\Nwould pause, Dialogue: 0,0:27:56.34,0:27:59.41,Default,,0000,0000,0000,,and it would take a very long time, right. Dialogue: 0,0:27:59.41,0:28:01.90,Default,,0000,0000,0000,,So the- this problem was way more technical.\NIt Dialogue: 0,0:28:01.90,0:28:04.17,Default,,0000,0000,0000,,had nothing to do with the behavior or, you Dialogue: 0,0:28:04.17,0:28:09.44,Default,,0000,0000,0000,,know, like, or practices part of, or side\Nof Dialogue: 0,0:28:09.44,0:28:11.46,Default,,0000,0000,0000,,things. It was pure technical problem. And\Ngoal was Dialogue: 0,0:28:11.46,0:28:13.06,Default,,0000,0000,0000,,for us to find the root cause of this Dialogue: 0,0:28:13.06,0:28:17.20,Default,,0000,0000,0000,,unpredictable behavior and fix it, right.\NAnd, yeah, like Dialogue: 0,0:28:17.20,0:28:20.34,Default,,0000,0000,0000,,we were, like we can definitely talk about\Nhow Dialogue: 0,0:28:20.34,0:28:22.50,Default,,0000,0000,0000,,we went into, like a lot of different solving, Dialogue: 0,0:28:22.50,0:28:24.55,Default,,0000,0000,0000,,a lot of different symptoms, at one point\Neven Dialogue: 0,0:28:24.55,0:28:28.16,Default,,0000,0000,0000,,suspecting JRuby. You know, like, so it's\Nvery, like, Dialogue: 0,0:28:28.16,0:28:30.58,Default,,0000,0000,0000,,it becomes very hard for you to figure out, Dialogue: 0,0:28:30.58,0:28:32.47,Default,,0000,0000,0000,,OK, what is a problem, what is a symptom, Dialogue: 0,0:28:32.47,0:28:35.16,Default,,0000,0000,0000,,and like, go very methodical about it, right.\NSo Dialogue: 0,0:28:35.16,0:28:38.01,Default,,0000,0000,0000,,that's what this, this problem was going to\Nbe Dialogue: 0,0:28:38.01,0:28:38.100,Default,,0000,0000,0000,,about. But let's take this offline. At this\Npoint Dialogue: 0,0:28:38.100,0:28:39.03,Default,,0000,0000,0000,,we can- Dialogue: 0,0:28:39.03,0:28:39.14,Default,,0000,0000,0000,,A.K.: I mean, before that, yeah, let's Dialogue: 0,0:28:39.14,0:28:43.16,Default,,0000,0000,0000,,get out some questions. Dialogue: 0,0:28:43.16,0:28:45.84,Default,,0000,0000,0000,,P.S.: Yeah, let's take some Dialogue: 0,0:28:45.84,0:28:47.72,Default,,0000,0000,0000,,questions if you have any. Dialogue: 0,0:28:47.72,0:28:48.92,Default,,0000,0000,0000,,A.K.: Cool. Dialogue: 0,0:28:48.92,0:28:50.52,Default,,0000,0000,0000,,P.S.: Cool, thanks. Dialogue: 0,0:28:50.52,0:28:51.72,Default,,0000,0000,0000,,A.K.: Thanks. Dialogue: 0,0:28:51.72,0:28:53.18,Default,,0000,0000,0000,,P.S.: Thanks guys.