{"id":337,"date":"2011-08-18T12:19:23","date_gmt":"2011-08-18T11:19:23","guid":{"rendered":"http:\/\/floris.briolas.nl\/floris\/?page_id=337"},"modified":"2011-08-18T12:19:23","modified_gmt":"2011-08-18T11:19:23","slug":"coding-techniques-im-using","status":"publish","type":"page","link":"https:\/\/floris.briolas.nl\/floris\/about\/coding-techniques-im-using\/","title":{"rendered":"Coding Techniques I&#8217;m using"},"content":{"rendered":"<p>Unit Testing<\/p>\n<p>I&#8217;m someone that writes unit tests. I don&#8217;t understand why people don&#8217;t like them.<\/p>\n<p>When i see others\u00a0struggling\u00a0to get their code running, I often see them going through the same time consuming motions of:<\/p>\n<ul>\n<li>Starting the app<\/li>\n<li>logging in<\/li>\n<li>Waiting for menu to load<\/li>\n<li>Click several items<\/li>\n<\/ul>\n<p>This will cost then minutes of precious time that could have been used\u00a0elsewhere. I just hit [CTRL]+[R],[CTRL]+[A] (all test) or\u00a0[CTRL]+[R],[CTRL]+[T] (current unit test).<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Assertions<\/p>\n<p>I&#8217;ve written lots and lots of code. I&#8217;ve written code with lot&#8217;s of people. I know I won&#8217;t remember it all. When I write code I know that certain conditions will fail my code,.. or when this code ran, the state should be xyz.<\/p>\n<p>I use the Debug.Assert(&#8230;) to anchor such logic, and when it fails, I can\u00a0immediately see what has gone wrong.<\/p>\n<p>Debug.Asserts are a tool that I use to write defensive code.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Unit Testing I&#8217;m someone that writes unit tests. I don&#8217;t understand why people don&#8217;t like them. When i see others\u00a0struggling\u00a0to get their code running, I often see them going through the same time consuming motions of: Starting the app logging in Waiting for menu to load Click several items This will cost then minutes of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2,"menu_order":0,"comment_status":"open","ping_status":"open","template":"","meta":{"jetpack_post_was_ever_published":false},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P61yPs-5r","_links":{"self":[{"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/pages\/337"}],"collection":[{"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/comments?post=337"}],"version-history":[{"count":1,"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/pages\/337\/revisions"}],"predecessor-version":[{"id":338,"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/pages\/337\/revisions\/338"}],"up":[{"embeddable":true,"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/pages\/2"}],"wp:attachment":[{"href":"https:\/\/floris.briolas.nl\/floris\/wp-json\/wp\/v2\/media?parent=337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}