{"id":102,"date":"2019-03-21T14:08:52","date_gmt":"2019-03-21T13:08:52","guid":{"rendered":"https:\/\/wissing.me\/?p=102"},"modified":"2020-04-18T19:17:01","modified_gmt":"2020-04-18T18:17:01","slug":"learning-by-teaching-tdd","status":"publish","type":"post","link":"https:\/\/daan.wsng.eu\/index.php\/2019\/03\/21\/learning-by-teaching-tdd\/","title":{"rendered":"Learning by Teaching: TDD"},"content":{"rendered":"\n<p>Not too long ago I gave a workshop on using TDD. Not because I like to give workshops or presentations, I am horrible at public speaking (this is worthy of a blog post on its own by the way). However, I believe that the best way of studying something, is by teaching it. It forces you to take a different look on the subject, writing down what you know, questioning your current views. And it sparks debate. I got questions on what I thought was common sense, but afterwards didn&#8217;t seem to be so sensible after all. All in all, a very rewarding and meaningful experience. The workshop itself consisted of a short presentation of TDD (because there was a wide range of TDD experience in the public), a live part where the start of a <a rel=\"noreferrer noopener\" aria-label=\"TDD Kata (opens in a new tab)\" href=\"http:\/\/codingdojo.org\/\" target=\"_blank\">TDD Kata<\/a> was done and a workshop part where the public would attempt to finish the kata with supervision. Here is how I did it.<\/p>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" width=\"1024\" height=\"606\" src=\"https:\/\/wissing.me\/wp-content\/uploads\/tdd1-1024x606.jpg\" alt=\"\" data-id=\"103\" data-link=\"https:\/\/wissing.me\/?attachment_id=103\" class=\"wp-image-103\" srcset=\"https:\/\/daan.wsng.eu\/wp-content\/uploads\/tdd1-1024x606.jpg 1024w, https:\/\/daan.wsng.eu\/wp-content\/uploads\/tdd1-300x178.jpg 300w, https:\/\/daan.wsng.eu\/wp-content\/uploads\/tdd1-768x455.jpg 768w, https:\/\/daan.wsng.eu\/wp-content\/uploads\/tdd1-850x503.jpg 850w, https:\/\/daan.wsng.eu\/wp-content\/uploads\/tdd1.jpg 1600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/li><\/ul><\/figure>\n\n\n\n<h2>Partner up<\/h2>\n\n\n\n<p>Find somebody who is willing to help you in a significant way. I don&#8217;t mean just for advice on a specific subject, but somebody who will coach you, be a mentor to you or will be a co-host. <\/p>\n\n\n\n<p>When I had the first idea of doing a workshop on this, I proposed it to my manager. He told me that just the day before a colleague of mine had the exact same idea, and he asked me of we could cooperate on this. Luckily I could get along with my coworker very well and we had the same ideas, so that worked out pretty good. During preparations we had close contact: on who would present what, which ideas were important and who would pick up on some practical stuff. This had made me much more comfortable than when I had to do it all alone<\/p>\n\n\n\n<h2>Ask for input<\/h2>\n\n\n\n<p>Since the audience was very mixed (ranging between interns and professionals with 20+ years of experience) we had to carefully consider what to talk about. I asked several people for input, which gave us a good idea on where to start and what topics to include.<\/p>\n\n\n\n<h2>Revisit the basics<\/h2>\n\n\n\n<p>To make sure that I was not talking out of my ass, I forced myself to look at the basics again of TDD. I followed some introductory courses, did some assignments and exercises myself and read a bunch of blogs and articles. Most of what I read I already knew, but it was nice to have some confirmation. But I also learned a few things I didn&#8217;t know yet! <\/p>\n\n\n\n<p>By doing some exercises I could get a feeling on how to implements some details of the workshop. After a short presentation I demonstrated how a red-green-refactor cycle looked like. By practicing with some TDD katas I got a feeling again on how to do these. Yes, I&#8217;m aware that they are meant to be done often so you keep your skill up. I am not perfect. I also created and executed the workshop kata several times to make it perfect. It&#8217;s not, but it was better fitting than the first version I made.<br><\/p>\n\n\n\n<h2>Set a deadline<\/h2>\n\n\n\n<p>For me, setting a deadline gives me something to work to. Too often I have task that I have to do, but never really focus on because I don&#8217;t have an incentive to finish it soon. A deadline really helps me! Even if it is set far in the future (say 3 months) I have a bit of feeling on when I should be ready on certain things and I can make a global planning.<\/p>\n\n\n\n<h2>Start small<\/h2>\n\n\n\n<p>I already said: I&#8217;m horrible at public speaking. I get nervous, forgot what I was going to say and start mumbling when I&#8217;m stressed. I&#8217;ve taken a lot of opportunities to do it again and again. I am getting better at it, but that doesn&#8217;t mean I have to like it. By starting this with a small group does help, since it really makes a difference if you speak to 10 people, or to 200. I even felt kind of confident, which was also due to not doing this alone<\/p>\n\n\n\n<h2>Conclusion<\/h2>\n\n\n\n<p>So, these are things I did to prepare myself as much as possible to push my boundaries and give this workshop. Each of those things helped me on this challenge, but most of all: by explicitly doing these and preparing myself this way, I gained the confidence that is necessary to pull off a workshop like this. Even though it was only for a small group, I had the feeling that I conquered myself and will feel a lot more sure when I have to do something like this again.<\/p>\n\n\n\n<p>[18-04-2020] Addendum: The starting code for this kata can be found on my github: <a href=\"https:\/\/github.com\/daanwissing\/tdd-workshop-csharp\">https:\/\/github.com\/daanwissing\/tdd-workshop-csharp<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Not too long ago I gave a workshop on using TDD. Not because I like to give workshops or presentations, I am horrible at public speaking (this is worthy of a blog post on its own by the way). However, I believe that the best way of studying something, is by teaching it. It forces&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"twitterCardType":"","cardImageID":0,"cardImage":"","cardTitle":"","cardDesc":"","cardImageAlt":"","cardPlayer":"","cardPlayerWidth":0,"cardPlayerHeight":0,"cardPlayerStream":"","cardPlayerCodec":""},"categories":[4,10,11],"tags":[],"_links":{"self":[{"href":"https:\/\/daan.wsng.eu\/index.php\/wp-json\/wp\/v2\/posts\/102"}],"collection":[{"href":"https:\/\/daan.wsng.eu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daan.wsng.eu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daan.wsng.eu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/daan.wsng.eu\/index.php\/wp-json\/wp\/v2\/comments?post=102"}],"version-history":[{"count":4,"href":"https:\/\/daan.wsng.eu\/index.php\/wp-json\/wp\/v2\/posts\/102\/revisions"}],"predecessor-version":[{"id":158,"href":"https:\/\/daan.wsng.eu\/index.php\/wp-json\/wp\/v2\/posts\/102\/revisions\/158"}],"wp:attachment":[{"href":"https:\/\/daan.wsng.eu\/index.php\/wp-json\/wp\/v2\/media?parent=102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daan.wsng.eu\/index.php\/wp-json\/wp\/v2\/categories?post=102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daan.wsng.eu\/index.php\/wp-json\/wp\/v2\/tags?post=102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}