{"id":1699,"date":"2016-02-18T21:43:22","date_gmt":"2016-02-18T20:43:22","guid":{"rendered":"https:\/\/2016.nuremberg.wordcamp.org\/?post_type=wcb_session&#038;p=1699"},"modified":"2016-04-20T11:45:32","modified_gmt":"2016-04-20T09:45:32","slug":"how-not-to-write-testable-code","status":"publish","type":"wcb_session","link":"https:\/\/nuremberg.wordcamp.org\/2016\/session\/how-not-to-write-testable-code\/","title":{"rendered":"How (Not) to Write Testable Code"},"content":{"rendered":"<p>This session is about writing code that can easily be tested. By means of negative examples, Thorsten explains what makes code rather hard to test, or even untestable.\u00a0Each &#8222;bad practice&#8220; is first presented in an abstract way, and then illustrated and discussed using one or more concrete PHP and JavaScript code examples.\u00a0In the end, Thorsten shows how to solve the individual issues at hand, and thus produce testable code\u2014even if you don&#8217;t test it yourself.<\/p>\n<p><iframe title=\"VideoPress Video Player\" aria-label='VideoPress Video Player' width='625' height='352' src='https:\/\/video.wordpress.com\/embed\/70Zy6oM5?hd=1&amp;cover=1' frameborder='0' allowfullscreen allow='clipboard-write'><\/iframe><script src='https:\/\/v0.wordpress.com\/js\/next\/videopress-iframe.js?m=1674852142'><\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This session is about writing code that can easily be tested. By means of negative examples, Thorsten explains what makes code rather hard to test, or even untestable.\u00a0Each &#8222;bad practice&#8220; is first presented in an abstract way, and then illustrated and discussed using one or more concrete PHP and JavaScript code examples.\u00a0In the end, Thorsten [&hellip;]<\/p>\n","protected":false},"author":14599396,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1460797200,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[1587],"footnotes":""},"session_track":[502936,758805,111,757829],"session_category":[],"class_list":["post-1699","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-english","wcb_track-peter-henlein","wcb_track-video","wcb_track-vortrag"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6uG2s-rp","jetpack_likes_enabled":true,"session_date_time":{"date":"16.4.16","time":"11:00"},"session_speakers":[{"id":"1587","slug":"thorsten-frommen","name":"Thorsten Frommen","link":"https:\/\/nuremberg.wordcamp.org\/2016\/speaker\/thorsten-frommen\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/nuremberg.wordcamp.org\/2016\/wp-json\/wp\/v2\/sessions\/1699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nuremberg.wordcamp.org\/2016\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/nuremberg.wordcamp.org\/2016\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":10,"href":"https:\/\/nuremberg.wordcamp.org\/2016\/wp-json\/wp\/v2\/sessions\/1699\/revisions"}],"predecessor-version":[{"id":3841,"href":"https:\/\/nuremberg.wordcamp.org\/2016\/wp-json\/wp\/v2\/sessions\/1699\/revisions\/3841"}],"speakers":[{"embeddable":true,"href":"https:\/\/nuremberg.wordcamp.org\/2016\/wp-json\/wp\/v2\/speakers\/1587"}],"author":[{"embeddable":true,"href":"https:\/\/nuremberg.wordcamp.org\/2016\/wp-json\/wporg\/v1\/users\/tfrommen"}],"wp:attachment":[{"href":"https:\/\/nuremberg.wordcamp.org\/2016\/wp-json\/wp\/v2\/media?parent=1699"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/nuremberg.wordcamp.org\/2016\/wp-json\/wp\/v2\/session_track?post=1699"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/nuremberg.wordcamp.org\/2016\/wp-json\/wp\/v2\/session_category?post=1699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}