{"id":565,"date":"2020-09-09T06:00:00","date_gmt":"2020-09-09T10:00:00","guid":{"rendered":"http:\/\/www.johnnybatch.com\/?p=565"},"modified":"2020-09-03T15:56:21","modified_gmt":"2020-09-03T19:56:21","slug":"chapter-0","status":"publish","type":"post","link":"http:\/\/www.johnnybatch.com\/?p=565","title":{"rendered":"Chapter 0"},"content":{"rendered":"\n<p>A tradition that I started with my first Joshua Jones novel is that the first chapter is always zero. If you&#8217;re a programmer, you get this right away. If you&#8217;re not, you may be wondering why I do that. <\/p>\n\n\n\n<p>In programming, an array of &#8220;things&#8221; is always counted with a zero: zero, one, two, three. Here&#8217;s a good definition of the programming construct called <a href=\"https:\/\/www.geeksforgeeks.org\/introduction-to-arrays\/\" data-type=\"URL\" data-id=\"https:\/\/www.geeksforgeeks.org\/introduction-to-arrays\/\">array<\/a>. Okay, so arrays start with zero because they are referencing a spot in memory. Got it. So, why do I start with Chapter 0? Because, chapters are but a string of similar items contained in a book. So you could define a book in programming terms as <em>an array of chapters<\/em>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"569\" height=\"375\" src=\"http:\/\/www.johnnybatch.com\/wp-content\/uploads\/2020\/09\/BookArray-1.png\" alt=\"\" class=\"wp-image-572\" srcset=\"http:\/\/www.johnnybatch.com\/wp-content\/uploads\/2020\/09\/BookArray-1.png 569w, http:\/\/www.johnnybatch.com\/wp-content\/uploads\/2020\/09\/BookArray-1-300x198.png 300w\" sizes=\"auto, (max-width: 569px) 100vw, 569px\" \/><\/figure>\n\n\n\n<p>In the above image, I&#8217;ve created a book array of chapters and it starts with 0 and ends with 7. I then add another chapter to the book array, by referencing its place in the array. It&#8217;s in the 9th spot, counting from 0. When I print out the book array, it now has 8 chapters.<\/p>\n\n\n\n<p>Looking at it like that, it makes perfect sense. Think like a programmer. Because the Protagonist is a programmer and this is a Cybercrime novel, not a Police Procedural. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>A tradition that I started with my first Joshua Jones novel is that the first chapter is always zero. If you&#8217;re a programmer, you get this right away. If you&#8217;re &hellip;<\/p>\n","protected":false},"author":2,"featured_media":570,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,7],"tags":[43,45,44],"class_list":["post-565","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming","category-writing","tag-arrays","tag-cybercrime","tag-python"],"_links":{"self":[{"href":"http:\/\/www.johnnybatch.com\/index.php?rest_route=\/wp\/v2\/posts\/565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.johnnybatch.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.johnnybatch.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.johnnybatch.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.johnnybatch.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=565"}],"version-history":[{"count":2,"href":"http:\/\/www.johnnybatch.com\/index.php?rest_route=\/wp\/v2\/posts\/565\/revisions"}],"predecessor-version":[{"id":573,"href":"http:\/\/www.johnnybatch.com\/index.php?rest_route=\/wp\/v2\/posts\/565\/revisions\/573"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.johnnybatch.com\/index.php?rest_route=\/wp\/v2\/media\/570"}],"wp:attachment":[{"href":"http:\/\/www.johnnybatch.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.johnnybatch.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=565"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.johnnybatch.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}