{"id":843,"date":"2019-11-09T10:37:12","date_gmt":"2019-11-09T10:37:12","guid":{"rendered":"https:\/\/netlab.com.ph\/?p=843"},"modified":"2019-11-09T10:37:12","modified_gmt":"2019-11-09T10:37:12","slug":"a-bit-of-coding-concepts-part-one","status":"publish","type":"post","link":"https:\/\/netlab.com.ph\/?p=843","title":{"rendered":"A bit of Coding Concepts &#8211; Part One"},"content":{"rendered":"\n<p>Exploring how to program would be more rewarding if we knew\na few fundamental coding concepts. But before we learn basic coding concepts,\nwe need to know why do we need to make a program in the first place.<\/p>\n\n\n\n<p>We make programs because we like to create, design and make\nthings. Every computer program ever built was designed to solve something or\nserve a purpose. A program, which can be called a code or sometimes a script,\ntells a computer what to do. A program is basically just a set or list of instructions\nthat is inputted to a computer to accomplish a certain task or solve a problem.\nThese instructions typically have an order on which instruction or set is to be\nfirst executed and is called an <strong>algorithm<\/strong>.<\/p>\n\n\n\n<p><strong>Design Thinking<\/strong><\/p>\n\n\n\n<p>Whatever you build with code should serve a purpose or fill a need. To help us design and make things, we will use a process called designed thinking &#8211; a specific framework for identifying problems, designing solutions, testing and refining.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/netlab.com.ph\/wp-content\/uploads\/2019\/11\/dt.jpg\" alt=\"\" class=\"wp-image-849\"\/><\/figure>\n\n\n\n<p>The design thinking process includes five steps:<\/p>\n\n\n\n<p>   1. Empathize \u2013 learn and try to understand the problem you are trying to          solve<\/p>\n\n\n\n<p>   2. Define \u2013 analyze and identify the problems or needs<\/p>\n\n\n\n<p>   3. Ideate \u2013 brainstorm several possible creative solutions<\/p>\n\n\n\n<p>   4. Prototype \u2013 construct rough drafts or sketches of your ideas<\/p>\n\n\n\n<p>   5. Test \u2013 test your prototype solutions, and refine until you come up with the final version<\/p>\n\n\n\n<p>To illustrate and give examples of each stage, let&#8217;s try to\ndesign and simulate a street traffic light signal and use the design thinking\nprocess. First stage is to emphatize what we are trying to make, that is to\nsimulate a traffic light signal using our micro:bit. Obviously, we can only use\nlow voltage and that means LED lights only for our simulation and use our micro:bit\nto control the timing of the lights. We are trying to identify the things that are\nneeded to accomplish our goal and this is called the define stage. We also need\nsome wires, resistor and breadboard. The next stage is ideate and figure out\nhow we can turn the LED lights on and off with a specific timing to simulate a\ntraffic light using block programming. The fourth stage is to make a prototype\nand then build and test and refine our prototype which is the last stage of our\nprocess.<\/p>\n\n\n\n<p><strong>Pseudocode<\/strong><\/p>\n\n\n\n<p>To start designing our program, it&#8217;s easier to write them\ndown on a piece of paper and make a rough draft of our program. It will contain\na step-by-step process on how our program will work. These skeletal instruction\nis what we call a pseudocode. It may just contain sentences describing the flow\nof the program or even contain actual code.<\/p>\n\n\n\n<p>Our traffic light signal program might look like this:<\/p>\n\n\n\n<p>   1. Start with red signal light for 6 seconds.<\/p>\n\n\n\n<p>   2. Yellow signal lights up for 3 seconds.<\/p>\n\n\n\n<p>   3. Green signal lights up for 8 seconds.<\/p>\n\n\n\n<p>   4. Yellow signal lights up for 3 seconds.<\/p>\n\n\n\n<p>   5. Repeat step 1.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Exploring how to program would be more rewarding if we knew a few fundamental coding concepts. But before we learn basic coding concepts, we need to know why do we need to make a program in the first place. We <a href=\"https:\/\/netlab.com.ph\/?p=843\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-843","post","type-post","status-publish","format-standard","hentry","category-microbit"],"_links":{"self":[{"href":"https:\/\/netlab.com.ph\/index.php?rest_route=\/wp\/v2\/posts\/843","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netlab.com.ph\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netlab.com.ph\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netlab.com.ph\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/netlab.com.ph\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=843"}],"version-history":[{"count":0,"href":"https:\/\/netlab.com.ph\/index.php?rest_route=\/wp\/v2\/posts\/843\/revisions"}],"wp:attachment":[{"href":"https:\/\/netlab.com.ph\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netlab.com.ph\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netlab.com.ph\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}