{"id":1075,"date":"2021-02-03T21:58:00","date_gmt":"2021-02-04T04:58:00","guid":{"rendered":"https:\/\/www.great-white-software.com\/blog\/?p=1075"},"modified":"2021-02-03T15:02:39","modified_gmt":"2021-02-03T22:02:39","slug":"lessons-i-relearned-today","status":"publish","type":"post","link":"https:\/\/www.great-white-software.com\/blog\/2021\/02\/03\/lessons-i-relearned-today\/","title":{"rendered":"Lessons I relearned today"},"content":{"rendered":"\n<ol class=\"wp-block-list\"><li>find the bug<\/li><li>write a test to show the bug<\/li><li>write the code to fix the bug<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">I&#8217;d made some changes to a client project and while I wasnt specifically fixing a bug I did alter a behaviour that resulted in one.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Turns out I didnt have a test already in place to reveal this change and that cost me a couple hours to track down, write the test, and fix the bug I&#8217;d caused.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Having a huge test suite built in (there are nearly 1500 unit tests for this code at present) has helped make sure that changes dont cause bugs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And the new ones will make sure they dont reappear<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Test early. Test often<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Stay sane !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>find the bug write a test to show the bug write the code to fix the bug I&#8217;d made some changes to a client project and while I wasnt specifically fixing a bug I did alter a behaviour that resulted in one. Turns out I didnt have a test already in place to reveal this &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.great-white-software.com\/blog\/2021\/02\/03\/lessons-i-relearned-today\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Lessons I relearned today&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-1075","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/1075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/comments?post=1075"}],"version-history":[{"count":1,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/1075\/revisions"}],"predecessor-version":[{"id":1076,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/posts\/1075\/revisions\/1076"}],"wp:attachment":[{"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/media?parent=1075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/categories?post=1075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.great-white-software.com\/blog\/wp-json\/wp\/v2\/tags?post=1075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}