{"id":2375,"date":"2019-12-14T13:00:00","date_gmt":"2019-12-14T13:00:00","guid":{"rendered":"https:\/\/chewett.co.uk\/blog\/?p=2375"},"modified":"2019-12-10T22:03:59","modified_gmt":"2019-12-10T22:03:59","slug":"im-participating-in-advent-of-code-2019","status":"publish","type":"post","link":"https:\/\/chewett.co.uk\/blog\/2375\/im-participating-in-advent-of-code-2019\/","title":{"rendered":"I&#8217;m Participating in Advent of Code 2019"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"678\" height=\"254\" data-attachment-id=\"2383\" data-permalink=\"https:\/\/chewett.co.uk\/blog\/2375\/im-participating-in-advent-of-code-2019\/advent_of_code_2019\/\" data-orig-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/12\/advent_of_code_2019.jpg?fit=800%2C300&amp;ssl=1\" data-orig-size=\"800,300\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"advent_of_code_2019\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/12\/advent_of_code_2019.jpg?fit=300%2C113&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/12\/advent_of_code_2019.jpg?fit=678%2C254&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/12\/advent_of_code_2019.jpg?resize=678%2C254&#038;ssl=1\" alt=\"\" class=\"wp-image-2383\" srcset=\"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/12\/advent_of_code_2019.jpg?w=800&amp;ssl=1 800w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/12\/advent_of_code_2019.jpg?resize=300%2C113&amp;ssl=1 300w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/12\/advent_of_code_2019.jpg?resize=768%2C288&amp;ssl=1 768w, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/12\/advent_of_code_2019.jpg?resize=50%2C19&amp;ssl=1 50w\" sizes=\"auto, (max-width: 678px) 100vw, 678px\" \/><\/figure>\n\n\n\n<p>This post talks about my participation in the Advent of Code competition 2019.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">What is Advent of Code<\/h2>\n\n\n\n<p>Advent of code is a set of programming puzzles that slowly increase in complexity.<\/p>\n\n\n\n<p>Every day during advent a new puzzle is released which has two parts. The first part is typically an introduction to the puzzle. The second part will normally be an expansion on the first, with the complexity increasing.<\/p>\n\n\n\n<p>Each days puzzle includes a few small examples which let you test your solution. These are provided so that you can test your solution on a few smaller examples.<\/p>\n\n\n\n<p>Ideally if your problem works on the smaller examples it should work on the final problem. These smaller examples are easier to debug than the more complex final problem.<\/p>\n\n\n\n<p>Once you have generated an answer you are able to submit the result and check to see if it is correct.<\/p>\n\n\n\n<p>The aim of the challange is to find interesting solutions to the puzzle. You are able to solve the problem in any programming language you choose.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">My Advent of Code 2019<\/h2>\n\n\n\n<p>I will be publishing all my solutions on GitHub for anyone to read and review. You can find this here:<\/p>\n\n\n\n<p><a href=\"http:\/\/github.com\/chewett\/adventofcode2019\/\">http:\/\/github.com\/chewett\/adventofcode2019\/<\/a><\/p>\n\n\n\n<p>Each day I will be publishing my solutions with the tests associated with them. I have chosen to program my solutions in Java.<\/p>\n\n\n\n<p>In addition to this I have created a private leaderboard with my company. We have a number of people competing to see who can finish the most challenges.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post talks about my participation in the Advent of Code competition 2019.<\/p>\n","protected":false},"author":1,"featured_media":2384,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[362,364,363],"class_list":["post-2375","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-informational","tag-advent-of-code","tag-java","tag-programming"],"wppr_data":{"cwp_meta_box_check":"No"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/12\/advent_of_code_2019-1.jpg?fit=800%2C800&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p2toWX-Cj","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2757,"url":"https:\/\/chewett.co.uk\/blog\/2757\/advent-of-code-2020-review\/","url_meta":{"origin":2375,"position":0},"title":"Advent of Code 2020 Review","author":"Chewett","date":"January 2, 2021","format":false,"excerpt":"Today I am talking about the Advent of Code 2020 and what I have learnt doing it this year. Advent of Code 2020 Advent of Code is a set of programming puzzles with one problem released each day during Advent. Each problem has two parts, the second normally being an\u2026","rel":"","context":"In &quot;Informational&quot;","block_context":{"text":"Informational","link":"https:\/\/chewett.co.uk\/blog\/category\/informational\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/12\/advent_of_code_2020_OUTPUT.png?fit=1161%2C618&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/12\/advent_of_code_2020_OUTPUT.png?fit=1161%2C618&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/12\/advent_of_code_2020_OUTPUT.png?fit=1161%2C618&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/12\/advent_of_code_2020_OUTPUT.png?fit=1161%2C618&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2020\/12\/advent_of_code_2020_OUTPUT.png?fit=1161%2C618&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":2267,"url":"https:\/\/chewett.co.uk\/blog\/2267\/creating-a-talos-principle-puzzle-solver\/","url_meta":{"origin":2375,"position":1},"title":"Creating a Talos Principle Puzzle Solver","author":"Chewett","date":"July 6, 2019","format":false,"excerpt":"This blog post talks about the Talos Principle puzzle solver I wrote to help solve the Sigil puzzles. The game \"The Talos Principle\" has points where you need to place a series of Tetris pieces, called sigils in the game, onto a puzzle board to move onto the next area.\u2026","rel":"","context":"In &quot;Software&quot;","block_context":{"text":"Software","link":"https:\/\/chewett.co.uk\/blog\/category\/software\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/07\/talos_principle_solver.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/07\/talos_principle_solver.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/07\/talos_principle_solver.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2019\/07\/talos_principle_solver.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":2514,"url":"https:\/\/chewett.co.uk\/blog\/2514\/ws2812b-8x8-led-matrix-panel-review-and-code\/","url_meta":{"origin":2375,"position":2},"title":"WS2812B 8&#215;8 LED Matrix Panel Review and Code","author":"Chewett","date":"May 8, 2021","format":false,"excerpt":"This post talks about how you can use the WS2812B 8x8 LED Matrix Panel with an Arduino. WS2812B 8x8 LED Matrix Panel The WS2812B 8x8 LED Matrix Panel is an square arrangement of 64 RGB LED's. Each LED has its own LED driver which allows you to individually address and\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/04\/WS2812B-8x8-LED-Matrix-Panel_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/04\/WS2812B-8x8-LED-Matrix-Panel_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/04\/WS2812B-8x8-LED-Matrix-Panel_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/04\/WS2812B-8x8-LED-Matrix-Panel_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2021\/04\/WS2812B-8x8-LED-Matrix-Panel_posticon_OUTPUT.png?fit=1200%2C628&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":535,"url":"https:\/\/chewett.co.uk\/blog\/535\/801s-wide-range-vibration-detection-sensor-review-code-examples\/","url_meta":{"origin":2375,"position":3},"title":"801S Wide Range Vibration Detection Sensor Review and code examples","author":"Chewett","date":"August 9, 2017","format":false,"excerpt":"This post reviews the 801S wide range vibration detection sensor. Here I review and test the sensor and provide code to use it. Overview of the Vibration sensor This sensor detects small movements and reports this back as either an analogue or digital signal. This doesn't provide any numerically measurable\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/801S_vibration_sensor_text.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/801S_vibration_sensor_text.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/801S_vibration_sensor_text.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/08\/801S_vibration_sensor_text.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":714,"url":"https:\/\/chewett.co.uk\/blog\/714\/magnetic-reed-switch-sensor-module-review-and-code-examples\/","url_meta":{"origin":2375,"position":4},"title":"Magnetic Reed Switch Sensor Module Review and code examples","author":"Chewett","date":"September 8, 2018","format":false,"excerpt":"This post reviews a\u00a0magnetic reed switch sensor module. There are many of these available on the internet and all\u00a0work similarly using a basic reed switch. Here I review and test the sensor and provide code to use it. Overview of the Magnetic Reed Switch sensor The magnetic reed switch Arduino\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/magnetic_reed_switch_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/magnetic_reed_switch_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/magnetic_reed_switch_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/magnetic_reed_switch_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":724,"url":"https:\/\/chewett.co.uk\/blog\/724\/sw-420-motion-vibration-sensor-review-code-examples\/","url_meta":{"origin":2375,"position":5},"title":"SW-420 Motion Vibration Sensor Review and code examples","author":"Chewett","date":"October 25, 2017","format":false,"excerpt":"This post reviews the SW-420 motion vibration sensor. Here I review, test and provide code to use the sensor. Overview of the Vibration Sensor This motion vibration sensor detects small movements and reports this back as a digital signal. This digital signal represents whether there is motion above the configured\u2026","rel":"","context":"In &quot;Electronics&quot;","block_context":{"text":"Electronics","link":"https:\/\/chewett.co.uk\/blog\/category\/electronics\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/chewett.co.uk\/blog\/wp-content\/uploads\/2017\/10\/sw420_vibration_sensor_post_icon.jpg?fit=800%2C800&ssl=1&resize=700%2C400 2x"},"classes":[]}],"_links":{"self":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=2375"}],"version-history":[{"count":8,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2375\/revisions"}],"predecessor-version":[{"id":2386,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/posts\/2375\/revisions\/2386"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media\/2384"}],"wp:attachment":[{"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=2375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=2375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/chewett.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=2375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}