<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Kwamena Amissah on Medium]]></title>
        <description><![CDATA[Stories by Kwamena Amissah on Medium]]></description>
        <link>https://medium.com/@kwamamissah?source=rss-574cd5a68074------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*qBwlI-EXfLkpBFMq</url>
            <title>Stories by Kwamena Amissah on Medium</title>
            <link>https://medium.com/@kwamamissah?source=rss-574cd5a68074------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 07:53:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kwamamissah/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A fetch() dilemma]]></title>
            <link>https://medium.com/@kwamamissah/a-fetch-dilemma-33a29fd7cd16?source=rss-574cd5a68074------2</link>
            <guid isPermaLink="false">https://medium.com/p/33a29fd7cd16</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[code-challenge]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[promises]]></category>
            <category><![CDATA[codingbootcamp]]></category>
            <dc:creator><![CDATA[Kwamena Amissah]]></dc:creator>
            <pubDate>Tue, 08 Jan 2019 03:10:09 GMT</pubDate>
            <atom:updated>2019-01-08T03:10:09.630Z</atom:updated>
            <content:encoded><![CDATA[<p>After eight weeks of being in bootcamp, I had my first moment where I felt shook. Mod 3 — Javascript, was the most challenging module for me thus far. Not because I didn’t think I understood the material. But more so because I did not know what I did not know.</p><p>We took our code challenge the Friday before Christmas break and I went in thinking I knew everything I needed to know to pass. Within moments of the test beginning, I could not get my fetch() to work. I knew if I could just get my data I could finish the code challenge. But I could never get it to fetch and I grew more and more frustrated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/1*t9Zcxyg2L8liaJ6PVa5RSg.png" /><figcaption>I tried writing this function multiple ways and nothing would work.</figcaption></figure><p>I ended up not completing the code challenge or even really getting started. I failed my first code challenge, and would not even be able to take it again for two weeks. That is all I could think about over the holiday break. I was determined however to make sure I passed the retake, not just to continue on to mod 4 but to prove to myself that I actually knew it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W93fYd1rmDIAY76oUqmyLw.png" /><figcaption>Fixed code to properly fetch data.</figcaption></figure><p>The first step in making sure I passed the retake was figuring out why I didn’t get the data to fetch the first time. What I learned was that even though I got the code syntax right, it was stuck in a Promise. When I originally coded the function I was trying to use .then(json =&gt; json.forEach(renderPage)) to get the page to render. I was accustomed to dealing with data that had multiple objects in an array, this particular challenge only had one object in the array.</p><h4>So here is what I learned from my fetch dilemma:</h4><ul><li>Set up a const variable for your fetch url</li><li>Set up an addEventListener for DOMContentLoaded <em>document.addEventListener(‘DOMContentLoaded’, initPage)</em></li><li>For fetch(URL) use json.forEach(<em>f</em>) when there is multiple objects in an array and<em> f</em>(json) for one object in an array</li><li>Set up <em>f</em> to renderPage. <em>Dataset attributes can be helpful in HTML if you can have access data later. You can save a data attribute with the syntax “data-name=‘${json.name}’ ” ’</em></li><li>Call event handlers that depend on renderPage at the bottom of the <em>f</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mZu5L6qoH6LNOWD_jlenww.png" /><figcaption>renderPage function</figcaption></figure><ul><li>If addEventListener is a form then use ‘submit’ instead of ‘click’</li><li>If addEventListener will be used on multiple nodes then you must use a forEach <em>f</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*if0DWabOVjtMql_-z_YvMA.png" /><figcaption>Event Listener that works on multiple comment buttons</figcaption></figure><ul><li>In the function that you pass through your event handler, you can use event.target to access data.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GDu8dxzKNOCgjBiSY23MNg.png" /></figure><ul><li>Use event.preventDefault() to prevent page from reloading when submit is clicked. <em>When this method is called the default action of the event will not be triggered</em></li><li>Use event.target.reset() to reset a field and event.target.remove() to delete elements from the DOM</li><li>Also don’t be afraid to throw a debugger in your code to see what your code is doing.</li></ul><p>Most importantly I learned that sometimes failing isn’t bad. Because then you can learn all of the things you didn’t even know you didn’t know; and you will be better for it.</p><p>kwam (:</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33a29fd7cd16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Promise to Callback]]></title>
            <link>https://medium.com/@kwamamissah/promise-to-callback-6277c2d96e2a?source=rss-574cd5a68074------2</link>
            <guid isPermaLink="false">https://medium.com/p/6277c2d96e2a</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[promises]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Kwamena Amissah]]></dc:creator>
            <pubDate>Tue, 18 Dec 2018 14:10:30 GMT</pubDate>
            <atom:updated>2018-12-18T14:10:30.362Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Related image" src="https://cdn-images-1.medium.com/proxy/1*BGiiqgFwaDq5eNHII17Lvw.png" /><figcaption>Picture from <a href="https://codeburst.io/playing-with-javascript-promises-a-comprehensive-approach-25ab752c78c3">codeburst.io</a></figcaption></figure><p>This week I have started week 7 of Flatiron’s coding bootcamp, the third module, which is all about Javascript. I initially thought it was going to be quite similar to Ruby with a few syntactical differences, but Javascript has so much depth and a lot to understand.</p><p>The thing that I really like about javascript is how much it can improve the user experience by adding fluidity to the web. It is a dynamic language which means that it executes at runtime many of the things that a static language does at compile time.</p><p>Since JavaScript is an event driven language it will keep executing while listening for other events instead of waiting for a response before moving on.</p><blockquote><em>Asynchrony in computer programming refers to the occurrence of events independently of the program flow and ways to deal with such events.</em></blockquote><p>In JavaScript an asynchronous operation has a result that points to a callback function that will be executed once that result is ready. This includes talking to databases or downloading files.</p><p>But when you have a callback nested in a callback, the code tends to be a bit less readable and can start to get messy. This is what is known as “callback hell”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*tR_X2VN31nM7GX_SEJynew.png" /><figcaption>Callback Hell Example from <a href="https://medium.com/@js_tut/the-great-escape-from-callback-hell-3006fa2c82e">The Great Escape from Callback Hell</a></figcaption></figure><p>One way to eliminate callback hell is by organizing your code into different, more shallow functions with the appropriate names and corresponding return action. This will break the code into smaller logical sections that can be used in multiple areas of your code, while making your code more readable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JJdHkx0c8tp4qXv_un9tJA.png" /><figcaption>Example of <a href="https://www.pluralsight.com/guides/introduction-to-asynchronous-javascript">refactoring nested callbacks </a>into smaller logical functions</figcaption></figure><blockquote>Another way to eliminate “callback hell” are Promises.</blockquote><p>A promise is an object that wraps an asynchronous operation and serves as a proxy for a value that is not always known when the promise is created. <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"><em>This lets asynchronous methods return values like synchronous methods: instead of immediately returning the final value, the asynchronous method returns a promise to supply the value at some point in the future.</em></a></p><p>A promise is an object that wraps an asynchronous operation and notifies when it’s done. Unlike a callback, a promise has its own methods which you call to tell the promise what will happen when it is successful or when it fails. These methods are .then() for when a successful result is available and .catch() for when there is an error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*QxfF00Obe8zUljxsqpjBZg.png" /><figcaption>Promise Example from <a href="https://medium.com/@js_tut/the-great-escape-from-callback-hell-3006fa2c82e">The Great Escape from Callback Hell</a></figcaption></figure><p>Instead of nesting callbacks Promises all you to chain .then() calls together to either return a new Promise, a value or an object which will be passed to the next .then() in the chain. When using .catch(), there are some differences from .then(); .catch() only has to be called on once even though we are doing two different asynchronous requests because any error that occurs in the Promise chain will stop further execution and an error will end up in the next .catch() in the chain.</p><p>To summarize:</p><ul><li>Asynchronous Code is similar to doing choirs, and instead of waiting for the laundry to finish before doing the dishes, you are able to get the dishes done, clean the bathroom and sweep before the clothes finish washing. Once the clothes are finish washing then you can put them in the dryer and then fold them.</li><li>The callback will be putting the clothes in the dryer once the clothes have finally finished washing. Then folding the clothes will be another callback, but then we will be nesting callbacks.</li><li>Instead we can add a Promise that says that once the clothes finish washing .then() we should put the clothes in the dryer .then() fold them. But while the clothes are going through the cycle we are still able to complete other choirs like washing the dishes, cleaning the bathroom and sweeping.</li></ul><p>This is a very basic understanding of callbacks and Promises but is a good starting point to creating cleaner and more effective javascript code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6277c2d96e2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Truly Unique (: — My First Ruby Project]]></title>
            <link>https://medium.com/@kwamamissah/truly-unique-my-first-ruby-project-47c0ab861536?source=rss-574cd5a68074------2</link>
            <guid isPermaLink="false">https://medium.com/p/47c0ab861536</guid>
            <category><![CDATA[ruby]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[cli]]></category>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Kwamena Amissah]]></dc:creator>
            <pubDate>Tue, 27 Nov 2018 17:10:03 GMT</pubDate>
            <atom:updated>2018-11-27T17:10:03.204Z</atom:updated>
            <content:encoded><![CDATA[<h3>Truly Unique (: — My First Ruby Project</h3><p>I recently completed my first coding project. It was a peer programming project to create a ruby CLI database application.</p><p>My partner and I came up with a few ideas, including creating a Magic 8 ball, trivia game, song generator and ruby cheatsheet. But out of all the ideas that we discussed, we decided to create a love letter generator — Truly Unique.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*o4oJhz9ogY79c_kIPIsRMQ.png" /><figcaption>Truly Unique CLI</figcaption></figure><p>Truly Unique was a name I came up with a few months ago when I was think of an idea to describe something that can represent a person who embraces who they truly are; and all of their uniqueness. The idea of the love letter generator came from my years of just writing random poem and quotes in my iPhone notes.</p><p>The first thing that we had to do for the project was to determine our database relationship. We needed three databases; User, Letter and History. User consists of a user’s id, name and email address. Letter, an id, kind, mood and tittle. History joins the User and Letter database. ActiveRecord was used to create the databases.</p><p>The program works by a user first signing up by giving their name and email address by methods that utilizes get.chomp.downcase to interact with the user responses. <em>Downcase takes away the case sensitivity of the user’s input.</em> The user’s input is then saved to the database and given an id.</p><p>The user is then asked by the application if they would like a poem or quote, followed by what kind of mood the user would like, funny, encouraging or loving. Based on the input the Letter database would return a poem or quote based on the user’s mood.</p><p>The cool part is that the next time the user login the application would remember the user’s email as their unique identifier. <em>We used an until statement that tells the program until a unique email is used then ask the user to enter a different email. </em>Once a user login again the application would ask if the user would like to see the last Letter they received. <em>This is because the application calls on the History database when the user logs back in to return the last letter they received. </em>The user then have the option of choosing a new poem or quote and the CLI prompts starts over again.</p><p>I learned during this project that peer programming is very helpful when developing. Your partner can catch things that you might have missed and vice versa; in addition to just adding different knowledge and perspective.</p><p><a href="https://asciinema.org/a/GMCYy5eiaQHkw54f1vt7Gezfk">untitled</a></p><p>I really enjoyed building out my first ruby project and am excited to see what else I can create as I learn more.</p><p>Stay tuned… (:</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47c0ab861536" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Breaking into Code As a Beginner]]></title>
            <link>https://medium.com/@kwamamissah/breaking-into-code-as-a-beginner-e6f6f9c44592?source=rss-574cd5a68074------2</link>
            <guid isPermaLink="false">https://medium.com/p/e6f6f9c44592</guid>
            <category><![CDATA[codingbootcamp]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <dc:creator><![CDATA[Kwamena Amissah]]></dc:creator>
            <pubDate>Tue, 06 Nov 2018 17:33:50 GMT</pubDate>
            <atom:updated>2018-11-06T17:33:50.724Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>“Give the pupils something to do, not something to learn; and the doing is of such a nature as to demand thinking; learning naturally results.” — John Dewey</em></blockquote><p>Learning anything new can be challenging. Learning how to program has felt like an absolute journey.</p><p>Two years ago I dabbled in a few Codeacademy and Code School courses on HTML and CSS; so the initial idea of learning to code seemed simple.</p><p>After my two year hiatus, I decided to reunite with my past inclination to develop some coding skills. But first I needed to figure out the best way to learn.</p><p>The beauty of the internet is that Google basically has an answer for everything. I searched for ways to learn how to code and found a lot of online resources to build skills as a developer.</p><p>I would now start my journey, splitting time between Intro to Web Development courses on Udemy and Udacity.</p><p>I started out strong, making my way through the introduction lessons on HTML and CSS, drawing on my previous knowledge from my Codeacademy days. I felt really good about my progress, because I was coding and I was visually seeing results on the web.</p><p>As I was building momentum, I hit a wall. HTML and CSS did not prepare me for Javascript. This might have been the first time that it registered with me that HTML and CSS isn’t programming. <em>yes, I already knew that HTML is just a mark-up language and CSS its stylesheet. </em>But coming from a place of not understanding code at all, it all looked the same.</p><p>My first lesson on Javascript came from the Udacity course. This was my first introduction to programming. And as I went through each topic I grew more and more confused. Arrays and objects, my mind felt like it was going in a loop as I sat trying to understand the basics of a while and for statement.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u3aSCeARGDsqR6JXEujyUA.png" /><figcaption>Udacity Lesson on Array Loops</figcaption></figure><p>I walked away from the Udacity course feeling like I only learned a few new terms and still had no clue on how to actually solve a problem using code. The thoughts of imposter syndrome started to creep into my mind and I needed to find another way to understand at least the basics of javascript.</p><p>Through another Google search I found a Udemy Intro to Web Development course that usually cost $99 but was on sale for $10; I could not pass that up!</p><p>Again, I breezed through the lessons on HTML and CSS. Then once again, I ran into Javascript. Colt, the instructor of the course, was solving all these problems with while loops and arrays and I just could not grasp the concepts. I was very confused and wanted google if there was a Rosetta Stone for the Javascript Language.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1THJALwp6bovilPinhAK7w.png" /><figcaption>Video from Udemy’s Web Developer Bootcamp</figcaption></figure><p>I didn’t find a Rosetta Stone but I did find Flatiron’s Bootcamp Prep. Flatiron’s Bootcamp Prep was unique to the other sources I tried before due to their Learn IDE (Integrated Development Environment). The Learn IDE allows you to launch a functional development environment right in your browser to work on getting test code to pass . This was awesome for me. I now had a way to actively practice coding versus just trying to follow along with slides and a video recording.</p><p>In the first week I finally understood how to solve problems using loops and arrays. This could be because at this point I had been learning Javascipt for about a month. But I think it was because I now had a way to interact with code and write solutions that directly caused test to pass. I could type solutions and see results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wokt7UkWjsmWppMV2BeT9Q.gif" /><figcaption>Learn IDE forEach Lab</figcaption></figure><p>Since working on the Flatiron Bootcamp Prep, I have applied and been accepted to Flatiron’s first Atlanta Immersive Software Engineering bootcamp.</p><p>I found that the best way for me to learn code, is by coding in a structured environment. Since starting class last week, I am learning a lot faster as I start to learn the meaning and reasoning behind things.</p><p><a href="https://www.sophia.org/tutorials/5-principles-of-constructivist-teaching-2">Constructivism</a> theorist believe learning is really personalized to each individual learner, because each individual person is constructing their own meaning out of new information. We connect new knowledge to our prior knowledge, and adjust our view of the world in order to accommodate new knowledge that has been presented to us.</p><p>To break into code, you have to first find what learning style works for you and just add patience to it. Learning to code isn’t an easy feat but can be quite rewarding if you stay persistent.</p><p>Coming from someone who for the longest time could never get past HTML and CSS; just stick with it, you’re closer than you think!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e6f6f9c44592" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>