{
    "componentChunkName": "component---src-templates-post-js",
    "path": "/blog/2018/10/02/ive-got-a-confession-to-make",
    "result": {"data":{"site":{"siteMetadata":{"title":"your friend Joel's digital garden","description":"Articles and notes from a collaborator at egghead.io. Musings on software, business, and life from a skilled virtual assistant.","author":{"name":"Joel Hooks"},"keywords":["Video Blogger"]}},"mdx":{"excerpt":"We don’t have a  single  test covering our front-end/UI for egghead.io. It’s  embarrassing. You know how it is. Testing is a good idea. It’s objectively better than the opposite, which in our case is click testing, twitter notifications…","fields":{"github":"https://github.com/joelhooks/joelhooks-com/tree/master/content/legacy_blog/2018-10-02-ive-got-a-confession-to-make.markdown"},"body":"var _excluded = [\"components\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n/* @jsxRuntime classic */\n\n/* @jsx mdx */\nvar _frontmatter = {\n  \"layout\": \"post\",\n  \"title\": \"I've got a confession to make 😭\",\n  \"date\": \"2018-10-02T00:00:00.000Z\"\n};\nvar layoutProps = {\n  _frontmatter: _frontmatter\n};\nvar MDXLayout = \"wrapper\";\nreturn function MDXContent(_ref) {\n  var components = _ref.components,\n      props = _objectWithoutProperties(_ref, _excluded);\n\n  return mdx(MDXLayout, _extends({}, layoutProps, props, {\n    components: components,\n    mdxType: \"MDXLayout\"\n  }), mdx(\"p\", null, \"We don\\u2019t have a \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"single\"), \" test covering our front-end/UI for egghead.io.\"), mdx(\"p\", null, \"It\\u2019s \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"embarrassing.\")), mdx(\"p\", null, \"You know how it is. Testing is a good idea. It\\u2019s objectively better than the opposite, which in our case is click testing, twitter notifications, and relying on our user base to \\u201Csmoke test\\u201D the application for us.\"), mdx(\"p\", null, \"It\\u2019s barely professional, but our current situation isn\\u2019t unique.\"), mdx(\"p\", null, \"The decision to write tests or not is often a matter of economics. Before egghead, working as a consultant building websites for other businesses, I was a testing zealot. At every opportunity I insisted that we absolutely, no excuses, 100% \", mdx(\"strong\", {\n    parentName: \"p\"\n  }, \"had\"), \" to have automated tests in place if we were going to build a high quality product.\"), mdx(\"p\", null, \"This is still true. I still believe this.\"), mdx(\"p\", null, \"But when I started building egghead, it was heads down, get shit done, features as fast as possible eff tests mode.\"), mdx(\"p\", null, \"Sometimes those early decisions come back to bite you. The system grows. Small choices take root and grow. That\\u2019s often good, but when it\\u2019s not the weeds creep through your entire project, setting choking out the good ideas and making the entire garden hard to maintain.\"), mdx(\"p\", null, \"So we started writing tests for critical aspects of the business. Our accounting backend has excellent test coverage and it \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"helps me sleep at night\"), \" knowing that or life blood flows through a quality system that we can count on. And it\\u2019s not just us. egghead instructors get paid royalties for their work. They rely on us, and put their trust in us.\"), mdx(\"p\", null, \"When that trust is broken, it is so hard to regain.\"), mdx(\"p\", null, \"Over the past two years we\\u2019ve been migrating our front-end from Rails erb server templates to React. It\\u2019s been a great project. A monsterous project in many ways, but worth the effort.\"), mdx(\"p\", null, \"Once again, I chose to forge ahead with no tests.\"), mdx(\"p\", null, \"I\\u2019m here to admit that I regret this decision, and want to start making changes. It\\u2019s embarrassing. It makes us look bad when something obviously broken ships to production. It\\u2019s particularly exacerbating when that something could have been easily prevented with some light automation, a couple integration tests, and a handful of unit tests!\"), mdx(\"p\", null, \"The tools are out there. React applications are super testable. There are no excuses for it.\"), mdx(\"p\", null, \"We have to make sure our users trust us. Their \", mdx(\"em\", {\n    parentName: \"p\"\n  }, \"trust\"), \" is our lifeblood.\"), mdx(\"p\", null, \"We are going to figure it out, and start making testing a priority.\"), mdx(\"p\", null, \"Cheers,\"), mdx(\"p\", null, \"Joel\"));\n}\n;\nMDXContent.isMDXComponent = true;","frontmatter":{"title":"I've got a confession to make 😭","date":"October 02, 2018","banner":null,"slug":null,"keywords":null}}},"pageContext":{"id":"2e842e11-3a1d-5c65-b6d1-e1475f910e98","prev":{"id":"e3cc36bb-dc75-506c-901b-7a322ab22d57","parent":{"name":"index","sourceInstanceName":"blog"},"excerpt":"I've done these posts for several years in a row, and this year as I sit down to write it out, there's a bit of a blank spot. 2018 was a pretty good year. But why? Hah, and more importantly why should  YOU  care?? These posts aren't about the reader…","fields":{"title":"2018 in Review","slug":"2018-in-review","date":"2019-01-04T00:00:00.000Z"}},"next":{"id":"71a00fe8-9a13-5efb-8e8c-16c0a08fe604","parent":{"name":"2018-02-12-how-we-work-at-egghead-dot-io","sourceInstanceName":"legacy"},"excerpt":"egghead.io is a platform to empower humans, built to challenge the status quo of how we work and learn new skills. We produce high quality, concise web development screencasts created by expert open-source contributors and other talented…","fields":{"title":"how we work at egghead.io in 2018","slug":"blog/2018/02/15/how-we-work-at-egghead-dot-io","date":"2018-02-15T00:00:00.000Z"}}}},
    "staticQueryHashes": ["1045846374"]}