{"id":68,"date":"2024-10-10T22:36:27","date_gmt":"2024-10-11T02:36:27","guid":{"rendered":"https:\/\/wp.stgeorges.bc.ca\/vincentz\/?p=68"},"modified":"2024-11-24T23:48:59","modified_gmt":"2024-11-25T04:48:59","slug":"coding-blog-post","status":"publish","type":"post","link":"https:\/\/wp.stgeorges.bc.ca\/vincentz\/2024\/10\/10\/coding-blog-post\/","title":{"rendered":"Coding Blog Post"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">10\/10\/2024<\/h4>\n\n\n\n<p>Here, I\u2019ll walk through my experience with the Replit 100 days of code learning journey. I will only do the tutorials until I learn how to properly implement all of these assessed skills:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXeavwO_u6sSEoiHd24Ba-xVE62A_FGtLKQPoXuwj-XHvp33g1kGz53TWogcDwn2TtsyN3k_iO9JbpcWWv-ccvVG80AdCyO6Ev6d4DBPL_qR8fwlyZlfAUE_9YLOQmP9AAqShPs6qGUFyvvnuoFbZSjpOpM?key=QdGXBQXkklrN_SKbqzBWJw\" alt=\"\" \/><\/figure>\n\n\n\n<p>So far, I really enjoy Replit\u2019s strong UI and UX, which really makes beginners feel confident and immersed into the experience. With the video tutorials , and an AI code helper and explainer, I believe that this task will be quite easy.<br><img loading=\"lazy\" decoding=\"async\" width=\"683\" height=\"267\" src=\"https:\/\/lh7-rt.googleusercontent.com\/docsz\/AD_4nXdonpEsR9FiLhttrBTcM2MhsovHmvgfC8gn7gmJpZnQc5fkS_BkZltzvHVTc0Rq7Sb_AU0Cic-55OtpEE7h22mwntB998vUc6Dq1S8tGrxE65zGQoU59ZsaGXp7iYXldzzedBXepKwUih52F-37QxqaqVQd?key=QdGXBQXkklrN_SKbqzBWJw\"><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Most of the basic coding skills were easy to learn, but I just need to get a better understanding of one criteria:<br><\/p>\n\n\n\n<p><strong>Flowcharting &#8211; there are standard practices of documenting the flow of your code.&nbsp; We are less concerned here with proper adherence to conventions than we are that you are building the practice of writing out your plan before you start coding.<\/strong><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>The tutorials were easier than I thought and I remembered knowledge from previous years. So with the help of some more advanced competitive programmers that could explain the more complicated functions to me, I can simply just hard-code anything that isn&#8217;t too advanced. <\/p>\n\n\n\n<p>I decided to code a morse code translator &#8211; for input and decryption. <\/p>\n\n\n\n<p>For the flowchart, I was having some difficulty figuring out how to actually design it, but with the help of some AI that gave me basic ideas and an outline of what I should create, I went ahead to creately to design a flowchart. It is also worth noting that AI is a great tool for outlining and coming up with ideas, but not using it for the entire project as the AI will never understand my thought process.<\/p>\n\n\n\n<figure class=\"wp-block-image alignwide size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"696\" src=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image-9-1024x696.png\" alt=\"\" class=\"wp-image-93\" srcset=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image-9-1024x696.png 1024w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image-9-300x204.png 300w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image-9-768x522.png 768w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image-9.png 1054w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Creately is a terrible app that should never be used &#8211; I literally spent an hour trying to format the flowchart correctly and it crashed twice and you cant properly screenshot with a good quality photo<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>This is after guidance from a competitive programmer<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><a href=\"https:\/\/pastebin.com\/4ngdUUBP\"><strong>RAW CODE FROM PASTEBIN <\/strong><\/a><\/h2>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"851\" height=\"990\" src=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135257141.png\" alt=\"\" class=\"wp-image-81 size-full\" srcset=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135257141.png 851w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135257141-258x300.png 258w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135257141-768x893.png 768w\" sizes=\"auto, (max-width: 851px) 100vw, 851px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p>I had to search online and input each value into the dictionary &#8211; originally, the code wasn&#8217;t formatted like this, but I just clicked on the format button and let Replit AI sort it out for me. It was a really helpful tool that I only learnt about after clicking on random buttons<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"789\" height=\"826\" src=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135609942.png\" alt=\"\" class=\"wp-image-82 size-full\" srcset=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135609942.png 789w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135609942-287x300.png 287w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135609942-768x804.png 768w\" sizes=\"auto, (max-width: 789px) 100vw, 789px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p><\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"820\" height=\"836\" src=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135716318.png\" alt=\"\" class=\"wp-image-83 size-full\" srcset=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135716318.png 820w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135716318-294x300.png 294w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135716318-768x783.png 768w\" sizes=\"auto, (max-width: 820px) 100vw, 820px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p>This part accesses the &#8220;morse_code_dictionary&#8221; using the current letter as a key. If the letter is found in the dictionary, it retrieves the corresponding Morse code value.<\/p>\n\n\n\n<p>I had some help from my friend with the more advanced functions and how to properly use them, including some functions that are shorter and more efficient to use.<\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"819\" height=\"841\" src=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135753728.png\" alt=\"\" class=\"wp-image-84 size-full\" srcset=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135753728.png 819w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135753728-292x300.png 292w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135753728-768x789.png 768w\" sizes=\"auto, (max-width: 819px) 100vw, 819px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p>A space is appended to the end of the input message to ensure that the last Morse code character is processed correctly.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>list(morse_code_dictionary.keys()): It converts the dictionary keys into a list.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Finally, it uses the index to retrieve the corresponding key from the list of keys to map the morse code character to the plain text character.<br><\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-media-text alignwide is-stacked-on-mobile\"><figure class=\"wp-block-media-text__media\"><img loading=\"lazy\" decoding=\"async\" width=\"843\" height=\"171\" src=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135906084.png\" alt=\"\" class=\"wp-image-85 size-full\" srcset=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135906084.png 843w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135906084-300x61.png 300w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image_2024-10-10_135906084-768x156.png 768w\" sizes=\"auto, (max-width: 843px) 100vw, 843px\" \/><\/figure><div class=\"wp-block-media-text__content\">\n<p>At the end, there&#8217;s user input gathered to choose between e and d<\/p>\n<\/div><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Sample output for Encryption and decryption<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"503\" height=\"108\" src=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image-4.png\" alt=\"\" class=\"wp-image-87\" style=\"width:620px;height:auto\" srcset=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image-4.png 503w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image-4-300x64.png 300w\" sizes=\"auto, (max-width: 503px) 100vw, 503px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"529\" height=\"76\" src=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image-5.png\" alt=\"\" class=\"wp-image-88\" style=\"width:654px;height:auto\" srcset=\"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image-5.png 529w, https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-content\/uploads\/sites\/18\/2024\/10\/image-5-300x43.png 300w\" sizes=\"auto, (max-width: 529px) 100vw, 529px\" \/><\/figure>\n\n\n\n<p>As you can see, it works both ways.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>10\/10\/2024 Here, I\u2019ll walk through my experience with the Replit 100 days of code learning journey. I will only do the tutorials until I learn how to properly implement all of these assessed skills: So far, I really enjoy Replit\u2019s strong UI and UX, which really makes beginners feel confident and immersed into the experience. [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-68","post","type-post","status-publish","format-standard","hentry","category-blg"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-json\/wp\/v2\/posts\/68","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-json\/wp\/v2\/comments?post=68"}],"version-history":[{"count":6,"href":"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-json\/wp\/v2\/posts\/68\/revisions"}],"predecessor-version":[{"id":100,"href":"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-json\/wp\/v2\/posts\/68\/revisions\/100"}],"wp:attachment":[{"href":"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-json\/wp\/v2\/media?parent=68"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-json\/wp\/v2\/categories?post=68"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.stgeorges.bc.ca\/vincentz\/wp-json\/wp\/v2\/tags?post=68"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}