{"id":613,"date":"2013-05-06T15:30:55","date_gmt":"2013-05-06T22:30:55","guid":{"rendered":"http:\/\/angryweasel.com\/blog\/?p=613"},"modified":"2013-05-06T15:30:57","modified_gmt":"2013-05-06T22:30:57","slug":"exploring-testing-and-programming","status":"publish","type":"post","link":"https:\/\/angryweasel.com\/blog\/exploring-testing-and-programming\/","title":{"rendered":"Exploring Testing and Programming"},"content":{"rendered":"<p>For the last day or so, I\u2019ve been thinking a lot about programming and testing, about collaboration and walls, and about where this may all be going. This post is the start of my mental exploration of the subject.  <\/p>\n<h4>In the beginning\u2026<\/h4>\n<\/p>\n<p>In How We Test Software at Microsoft, we told the story of Microsoft hiring our first tester, Lloyd Frink. Lloyd was a high school intern, and his job was to \u201ctest\u201d the Basic compiler by running some programs through the compiler and make sure they worked. That was 1979, but full time testers didn\u2019t show up at Microsoft until 1983. I have no recollection or knowledge of what was happening in the rest of the software industry at that time, but I imagine it was probably the same. Since then, Microsoft has hired thousands of testers (we currently employ over 9000), and the industry has hired a kazillion (yes, a made up number, because I really have no way of guessing) software testers (regardless of title).  <\/p>\n<p>Now, in the last several years, many teams (including some inside of Microsoft), have moved to the \u201cwhole team approach\u201d \u2013 where separation of testing and programming <em>roles<\/em> are blurred or gone (the activities will always exist). Even on teams where separate roles still exist, there is still a significant amount of blurring between which activities each role does as part of their job (for example, I, like many of my test colleagues, make changes to product code, just as many programmers on the team create and edit test code).  <\/p>\n<h4>The Wall<\/h4>\n<\/p>\n<p>The metaphorical \u201cwall\u201d between programming and testing is often quite high (as in programmers write code, then throw it over the wall to testers; who, in turn, throw the bugs back over the wall to developers, who make fixes and start the wall-chucking process over again). Lloyd was hired to catch stuff thrown to him over the wall, and I think it\u2019s a fair argument to say it would have been more efficient for developers to run those tests as part of a check-in suite (assuming, of course, they had such a thing).  <\/p>\n<p>To be completely transparent, a wall on my team still exists \u2013 it\u2019s just a much shorter wall. There are still expectations of programmers and testers that fit into the typical roles, but collaboration and code throwing don\u2019t occur often.  <\/p>\n<h4>Infection<\/h4>\n<\/p>\n<p>Elisabeth Hendrickson speaks often of being \u201ctest-infected\u201d to describe programmers who \u201cget\u201d testing (I believe the term was coined by Erich Gamma). I for one, can\u2019t think of a good reason for a programmer to not have some test ideas in their head when they write code. <\/p>\n<p>Similarly, I think that testers can benefit from being a bit \u201ccode-infected\u201d. Before the self-preserving screams of oppression begin, let me note that I said testers \u201c<i>can<\/i> benefit\u201d from some code knowledge. I\u2019m not talking about language expertise \u2013 a basic understanding of programming logic and some ideas on how computer programs <i>may<\/i> improve testing is usually plenty. It\u2019s not <em>necessary<\/em> to know anything about programming to be a tester \u2013 I\u2019m just saying it can help.  <\/p>\n<p>Beyond the disclaimer, it\u2019s worth elaborating on the last two paragraphs here. I have had testers tell me that knowledge of code will adversely affect the \u201ctester mindset\u201d \u2013 that by knowing how to code, the tester will somehow utilize less of their critical thinking or problem solving skills. While I suspect this to be a false assumption, I have no proof of whether this is true or not. But I will hypothesize that if this is true (that code-infection adversely affects testing skill), then it\u2019s just as likely that test-infection adversely effects programming ability. When I look at it this way, the answer clears up a bit. Take a moment to think about the best programmer you know. I\u2019m fortunate enough to work with some really incredible (and some famous) programmers. <i>Every single one of them is test-infected<\/i>. Yes \u2013 I have no hard data, and zero empirical research, so I could be high as a kite on this, but I\u2019d be curious to hear if anyone knows a great programmer who doesn\u2019t have the ability to think at least a little bit like a tester.  <\/p>\n<h4>Code Infected<\/h4>\n<\/p>\n<p>So \u2013 let\u2019s suppose for a few minutes that code-infection is beneficial for testers. Not even necessarily <i>equally<\/i> beneficial \u2013 just helpful. Is there such a thing as <i>too<\/i> <i>infected<\/i>? An old colleague of mine, John, once said,  <\/p>\n<blockquote>\n<p>\u201cI\u2019m not the best tester on the team, and I\u2019m not the best programmer. But, of the programmers on the team, I\u2019m the best tester, and of the testers, I\u2019m the best programmer\u201d. <\/p>\n<\/blockquote>\n<p>Which <i>role<\/i> should John be in? On your team, would he be a programmer, or a tester? Is it a clear cut decision, does it depend, or does it even matter? Is John a test-infected developer, or a code-infected tester? Does it matter?  <\/p>\n<p>I think the answer to the above questions are either \u201cIt depends\u201d, or \u201cIt doesn\u2019t matter\u201d, so let me ask a different question. Do you want a team full of John\u2019s? Maybe you do, or maybe you don\u2019t (or maybe it depends), so let me rephrase yet again in the form of a quick thought experiment.  <\/p>\n<h4>An experiment<\/h4>\n<\/p>\n<p>You are forming a nine-person team to make a super cool software application. You get to build a dream team to put it together. On a scale from 1-9, where a 1 is a tester with zero knowledge of programming, a 9 is a developer who can\u2019t even pronounce \u201cunit test\u201d, and a programmer \/ tester like John is a 5 &#8211; which employees do you hire (note that all of these people get paid the same, work the same hours, get along with each other, etc.).  <\/p>\n<p><a href=\"http:\/\/angryweasel.com\/blog\/wp-content\/uploads\/2013\/05\/clip_image002.png\"><img loading=\"lazy\" decoding=\"async\" title=\"clip_image002\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"clip_image002\" src=\"http:\/\/angryweasel.com\/blog\/wp-content\/uploads\/2013\/05\/clip_image002_thumb.png\" width=\"570\" height=\"332\"\/><\/a>&nbsp;<\/p>\n<p>To be fair, I don\u2019t think there\u2019s a \u201cright\u201d answer to this question, but we can certainly explore some options of what would be more or less \u201cright\u201d. One option is to (conveniently) select one of each type. Then you get infection-diversity! However, I\u2019m betting that most of you are thinking, \u201cThere\u2019s no room on my team for developers who don\u2019t write unit tests!\u201d So, is \u201csome\u201d testing knowledge enough? Is it possible to have too much? If I hire 7\u2019s and 8\u2019s, do I eventually want them to have more testing knowledge? If that\u2019s the case, should I just hire 5\u2019s and 6s instead? <\/p>\n<p>And what about testers? Remember, that code-infected doesn\u2019t necessarily mean that the testers are code-monkeys cranking out tools and automation all day long \u2013 it just means that they have (varying levels of) programming skills as part of their available toolbox. The context of the product may have some influence on my choice, but if you agree that <i>some<\/i> programming knowledge can\u2019t hurt, then maybe a 2 is better than a 1. But is a 3 better than a 2? \u201cI suppose that \u201cbetter\u201d depends, but to me, it\u2019s a worthwhile thought process.  <\/p>\n<h4>But that\u2019s not right\u2026<\/h4>\n<\/p>\n<p>If you\u2019ve read this far without jumping down to comments to yell at me, let me admit now that I\u2019ve led you in a bad direction. The exercise above sort of assumes that as you gain testing ability, you lose programming ability (and vice-versa). That\u2019s not true in the real world, so let\u2019s try a bit of a twist and see if we can be slightly more realistic. For this exercise, you have the $1,000,000 of salary to spend on a maximum of 10 employees. You have the following additional requirements: <\/p>\n<ul>\n<li>An employee can have a \u201cprogrammer\u201d rating of 0-10, where 0 is can\u2019t even write a batch file to 10 where they dream in algorithms.<\/li>\n<li>Similarly, an employee has a \u201ctester\u201d rating of 0-10 where 0 is no knowledge of testing, and is at least the best tester you\u2019ve ever dreamt of.<\/li>\n<li>Minimum salary is $50k, and the maximum salary is (arbitrarily) $160,000. <\/li>\n<\/ul>\n<p>Because context is important, let\u2019s say the app is a social networking site with clients for phones and tablets, as well as a web interface. Your exercise (if you want to play) is to think about the type of people you would use to staff this team. One option, for example, is to have five developers, each with a 10 rating (5x$100,000), paired with 10 testers who also each have a 10 rating (5x$100,000). Another option would be to have 6 developers, each with a 15 rating (e.g. 9-dev and 6-test for&nbsp; 6x$150,000=$800,000) paired with 4 testers, each with a 5 rating (4x$50,000-$20,000). The choice is yours, and there\u2019s no right answer \u2013 but I think the thought exercise is interesting.<\/p>\n<p>I\u2019ll close this post by saying that I really, really hate sequels and series when it comes to blog posts (and I\u2019ll add an extra \u201creally\u201d to that statement when referring to my <i>own<\/i> posts). But there\u2019s more to come here \u2013 both in my thoughts on testing and programming, and in more thought exercises that I hope you will consider.  <\/p>\n<p>More to come.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the last day or so, I\u2019ve been thinking a lot about programming and testing, about collaboration and walls, and about where this may all be going. This post is the start of my mental exploration of the subject. In the beginning\u2026 In How We Test Software at Microsoft, we told the story of Microsoft&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-613","post","type-post","status-publish","format-standard","hentry","category-allposts"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/posts\/613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/comments?post=613"}],"version-history":[{"count":0,"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/posts\/613\/revisions"}],"wp:attachment":[{"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/media?parent=613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/categories?post=613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/angryweasel.com\/blog\/wp-json\/wp\/v2\/tags?post=613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}