{"id":298,"date":"2023-02-13T10:24:15","date_gmt":"2023-02-13T10:24:15","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/?page_id=298"},"modified":"2023-02-15T09:29:36","modified_gmt":"2023-02-15T09:29:36","slug":"design","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/software-design-and-development\/week-1\/design\/","title":{"rendered":"Design"},"content":{"rendered":"\n<p>So you&#8217;ve now started coding. It&#8217;s pretty basic at this point but will quickly get more complicated. So how would you explain your code to another programmer? Or how would you plan out a more complex program before you start the actual coding process?<\/p>\n\n\n\n<p>There are multiple ways to design a program. Later in the course we will look at pseudocode and structure diagrams. But for now we will focus on using flowcharts to show the logic and data flow through our code.<\/p>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<p>Flowcharts are made up of different shaped boxes connected together with lines. <\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"896\" height=\"325\" src=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13121055\/fc_terminator-1.png\" alt=\"\" class=\"wp-image-307\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13121055\/fc_terminator-1.png 896w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13121055\/fc_terminator-1-300x109.png 300w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13121055\/fc_terminator-1-768x279.png 768w\" sizes=\"auto, (max-width: 896px) 100vw, 896px\" \/><\/figure><\/div>\n\n\n\n<p>The start and end points of your flow chart.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"896\" height=\"325\" src=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13102942\/fc_decision.png\" alt=\"Flowchart decision symbol\" class=\"wp-image-303\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13102942\/fc_decision.png 896w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13102942\/fc_decision-300x109.png 300w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13102942\/fc_decision-768x279.png 768w\" sizes=\"auto, (max-width: 896px) 100vw, 896px\" \/><\/figure><\/div>\n\n\n\n<p>A branching decision that can send the logic flow to other parts of the chart.<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"981\" height=\"322\" src=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13102947\/fc_io.png\" alt=\"Flowchart input output symbol\" class=\"wp-image-304\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13102947\/fc_io.png 981w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13102947\/fc_io-300x98.png 300w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13102947\/fc_io-768x252.png 768w\" sizes=\"auto, (max-width: 981px) 100vw, 981px\" \/><\/figure><\/div>\n\n\n\n<p>Fetching data from a user, file or API. Or outputting data to the screen, writing to a file or sending to an API.<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"965\" src=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13103041\/fc1-1024x965.png\" alt=\"Example flowchart using the terminator, decision and input output symbols\" class=\"wp-image-305\" srcset=\"https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13103041\/fc1-1024x965.png 1024w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13103041\/fc1-300x283.png 300w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13103041\/fc1-768x724.png 768w, https:\/\/blogs.glowscotland.org.uk\/es\/public\/software\/uploads\/sites\/4063\/2023\/02\/13103041\/fc1.png 1260w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption>Example flowchart<\/figcaption><\/figure><\/div>\n\n\n\n<p>The lines show the flow of data from one action of code to another. You must be able to draw a continuous line from the Start box to the Finish box no matter which choices you choose in a decision box. Decision boxes will always have at least 2 lines coming out of them. If they didn&#8217;t, then they wouldn&#8217;t be much of a decision. Put a label beside each line coming out of a decision box so that it is clear what decision was made.<\/p>\n\n\n\n<p class=\"nextlink\"><a href=\"https:\/\/blogs.glowscotland.org.uk\/es\/software\/software-design-and-development\/week-1\/challenge-3\/\" data-type=\"page\" data-id=\"310\">Next: Challenge 3<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>So you&#8217;ve now started coding. It&#8217;s pretty basic at this point but will quickly get more complicated. So how would you explain your code to another programmer? Or how would you plan out a more complex program before you start the actual coding process? There are multiple ways to design a program. Later in the&hellip; <a class=\"more-link\" href=\"https:\/\/blogs.glowscotland.org.uk\/es\/software\/software-design-and-development\/week-1\/design\/\">Continue reading <span class=\"screen-reader-text\">Design<\/span><\/a><\/p>\n","protected":false},"author":5710,"featured_media":0,"parent":14,"menu_order":11,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-298","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/298","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/users\/5710"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/comments?post=298"}],"version-history":[{"count":5,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/298\/revisions"}],"predecessor-version":[{"id":333,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/298\/revisions\/333"}],"up":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/pages\/14"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/es\/software\/wp-json\/wp\/v2\/media?parent=298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}