<?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 Jacob Nasrallah on Medium]]></title>
        <description><![CDATA[Stories by Jacob Nasrallah on Medium]]></description>
        <link>https://medium.com/@nasjac26?source=rss-470163c6c01b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*6m93u691XYIU12ptgq7ZWQ.jpeg</url>
            <title>Stories by Jacob Nasrallah on Medium</title>
            <link>https://medium.com/@nasjac26?source=rss-470163c6c01b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 13:21:39 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nasjac26/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[Check the Expiration Date: Cookies, sessionStorage, and localStorage]]></title>
            <link>https://medium.com/@nasjac26/check-the-expiration-date-cookies-sessionstorage-and-localstorage-65d5ee8fd127?source=rss-470163c6c01b------2</link>
            <guid isPermaLink="false">https://medium.com/p/65d5ee8fd127</guid>
            <category><![CDATA[cookies]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[sessionstorage]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[localstorage]]></category>
            <dc:creator><![CDATA[Jacob Nasrallah]]></dc:creator>
            <pubDate>Sat, 27 Nov 2021 17:53:05 GMT</pubDate>
            <atom:updated>2021-11-27T17:53:05.179Z</atom:updated>
            <content:encoded><![CDATA[<p>There are many ways and reasons you may store data with the browser. Maybe you want to aid in keep someone logged in if they have been authenticated. Perhaps a client wants to limit the views of free articles on their site. Depending on how long you want this tracking to last you have three main options:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UUv1LNe5PQdf5ZLXMDbu9A.jpeg" /><figcaption>Picture of me researching for this medium article</figcaption></figure><ol><li>Cookies:</li></ol><p>Cookies are very small files, no more than a few kb’s that help <a href="https://support.mozilla.org/en-US/kb/cookies-information-websites-store-on-your-computer">“store setting for a website”</a>. This is a way that as a developer you can save preferences of a user that persist as long as a user uses a web application. Do they like using dark mode? This is something we want to persist long after they restart their computer. Cookies require you to set expiration dates but the standard practice is to set them to expire in the year 9999, as in we don’t want them to expire!</p><p>2. sessionStorage:</p><p>sessionStorage is information stored on load of a tab in a browser. Its lifespan is only as long as the tab exists. If a user were to open another tab and attempt to access data stores in the sessionStorage of the other tab, such as a logged in account that has been authenticated, it would not persist to another tab. If they close the original tab is closed, the sessionStorage disappears as the session has ended. The benefit of sessionStorage is that information persists on refresh. If you want a simple secure solution for authentication or you want a user to start from the beginning of some process every time they visit your site, <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage">try sessionStorage</a>.</p><p>3.localStorage:</p><p>localStorage is similar to session storage but differs int he fact that it persists between sessions. It has a size limit of around 5MB compared to the few kb in a cookie. Simply, localStorage is simply a javascript object that is entirely a string we use to store data. It isn’t particularly secure so <a href="https://blog.logrocket.com/localstorage-javascript-complete-guide/">you should NOT store sensitive user information in it</a>. Additionally, local storage is synchronous so things will only execute one after the other. The cool thing though is you do not need a backend and you can do everything entirely in javascript. It wont clear when the browser closes so saved things persist. A good use for this could be setting the region for a user when they enter the site so the correct language populates on load. If you need non sensitive information to be stored long after the browser closes, localStorage is a valid option.</p><p>I wrote this up as there didn’t seem to be a guide for the three together. In each section I left a link to a reference guide you can explore for more information.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65d5ee8fd127" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Force a Page Refresh on Form Submission]]></title>
            <link>https://medium.com/@nasjac26/how-to-force-a-page-refresh-on-form-submission-7ea83e3ab472?source=rss-470163c6c01b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7ea83e3ab472</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[forms]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Jacob Nasrallah]]></dc:creator>
            <pubDate>Sun, 31 Oct 2021 16:50:34 GMT</pubDate>
            <atom:updated>2021-10-31T16:50:34.937Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are anything like me, you were probably surprised when that form you hooked up didn’t seem to work on hitting submit. Everything seemed to be wired correctly but the page stay the same. On refresh, you notice: It worked!</p><p>So why did it not update on our webpage?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VqpH8gtS3-BoFfs2T-n-Aw.png" /></figure><p>We need to tell our React app to update on form submit! We will do this with <strong>window.location.reload</strong>!</p><p>According to <a href="https://developer.mozilla.org/en-US/docs/Web/API/Location/reload">MDM Docs</a>, location.reload() is a method that “reloads the current URL, like the Refresh button”. Perfect for our situation!</p><p>You can implement this in many ways but I’ll give you a 1–2–3 on how I used it.</p><ol><li>Declare a const called refreshPage in the global scope. This is how I chose to implement window.location.reload:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*Vx8lVkrIWhywa-P9uYIBSw.png" /><figcaption>Image of our const to refresh that will be hooked up to our form submit</figcaption></figure><p>2. Create an <strong>onClick</strong> event on your button, attactching refreshPage which we made earlier to it:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/456/1*iZxw_djLFv6fmW2_8BUXiA.png" /><figcaption>Implementing in Javascript</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*v2Nhna28TpFCwu58l4Q7kQ.png" /><figcaption>Implementing with JSX in React</figcaption></figure><p>3. Crack open a cool one you are done friendo.</p><p>Often times frustrating problems have simple solutions. As you are sipping your preferred beverage say a thanks to all those before us who laid the ground work for us!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ea83e3ab472" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adding New Fonts to Your Website or Application]]></title>
            <link>https://medium.com/@nasjac26/adding-new-fonts-to-your-website-or-application-a0fa862f20fe?source=rss-470163c6c01b------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0fa862f20fe</guid>
            <category><![CDATA[styling]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[fonts]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Jacob Nasrallah]]></dc:creator>
            <pubDate>Mon, 11 Oct 2021 20:31:15 GMT</pubDate>
            <atom:updated>2021-10-11T20:31:15.958Z</atom:updated>
            <content:encoded><![CDATA[<p>Font choice can make the difference between a good application and excellent application. Adding new fonts and font families is an easy process; the hardest part is picking the perfect one.</p><p>While there are many ways to do this, a simple and reliable source for new fonts is <a href="https://fonts.google.com/">Google Fonts</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YzPAW_dzWD_u00HDMm8_Tg.png" /><figcaption>Top of the page of Google Fonts. Many fonts are at your disposal.</figcaption></figure><p>Google fonts is a free resource for fonts that you can directly link into your file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VUfLvHMB2PhKxV03J3wr7A.png" /><figcaption>Image of the selected font’s page in which you can pick a style to import.</figcaption></figure><p>After finding a font by scrolling and browsing, or by using the robust search parameters, click on the font card to bring up the fonts page. On this page you can adjust the size and styling of your font. When you find a style you want, click the “plus” symbol to the right of the font to add it to your list of fonts you would like to import.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/150/1*8SJ_IpSv6pGPs-TYV_Zlqw.png" /><figcaption>Image of your font “cart” on the top right. All the fonts you want to import.</figcaption></figure><p>When you have made your selections, click the three-squared icon on the top right of the screen to bring up the information needed to import the fonts into your code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/610/1*yFsoOHNUF_1OD4aZSt045A.png" /><figcaption>Image of the link address you need to import your fonts.</figcaption></figure><p>In the middle of the page, make sure the “&lt;link&gt;” bubble is selected and copy and paste these lines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y13_Z8zXZ27iT58ASq9d9Q.png" /><figcaption>Image of where you should paste your fonts in the Index.html in the &lt;head&gt;.</figcaption></figure><p>Navigate to your Index.html and paste these fonts <strong>within the “&lt;head&gt;” tag but under any other styling imports</strong> such as bootstrap.</p><p>You should now have access to these fonts. To use them though, you must add the appropriate CSS rules to your classes. These can be found in the same section as where you grabbed your import link.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/622/1*MheaVU1UwTQyHH-tqGRTXA.png" /><figcaption>Image of CSS rules to specify families.</figcaption></figure><p>You can copy and paste these CSS styling rules into a .css file, if you have one, or use in-line styling. Here is an example of that a CSS class with imported fonts used for styling might look like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*fOGq_k_2mpph2CjzlFlgDg.png" /><figcaption>Image of a custom font styling.</figcaption></figure><p>Learning to use fonts to enhance your web applications can be a powerful and quick way to add value to your work. While standard font families are safe choices, you should not limit yourself when trying to fulfill your or your client’s vision.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0fa862f20fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fixed vs Growth Mindsets in Coding]]></title>
            <link>https://medium.com/@nasjac26/fixed-vs-growth-mindsets-in-coding-9714482b3a4e?source=rss-470163c6c01b------2</link>
            <guid isPermaLink="false">https://medium.com/p/9714482b3a4e</guid>
            <category><![CDATA[teaching]]></category>
            <category><![CDATA[growth-mindset]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[Jacob Nasrallah]]></dc:creator>
            <pubDate>Mon, 20 Sep 2021 02:28:13 GMT</pubDate>
            <atom:updated>2021-09-20T02:29:40.602Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6RN41zrnqW2jHL43oNMCQ.jpeg" /><figcaption>Image by <a href="https://pixabay.com/users/enhialus-7891719/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4171740">Enhialus</a> from <a href="https://pixabay.com/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=4171740">Pixabay</a></figcaption></figure><p>One of the biggest points of learning for myself as an educator was identifying the “Fixed vs Growth Mindset” in my students behavior. Were they clutching to their successes and failures, letting these results in their work determine what their identity was as a person? Or did they have a “growth mindset”? Someone who as described by Maria Popova as someone who “…thrives on challenge and sees failure not as evidence of unintelligence but as a heartening springboard for growth”. Now more than ever as I make the transition into being a student, this question is brought to the forefront about my own relationship with my learnings.</p><p>Heading into my software engineering bootcamp at Flatiron School, I had a narrative about myself and my abilities. I believed it was going to be hard because told myself I lacked the natural aptitude my peers would have. I viewed myself as lazy in my youth, distracted. All of these things would write the book on my experience, I believed. I had a “fixed mindset” that did not allow myself the grace of being proud of the journey. It only allowed me to use my current results or abilities as the author of my narrative.</p><p>When undertaking this program I began determining my aptitude and experience before I had began. When undertaking something as difficult as learning how to code, remember to focus on where your are today in relationship to where you were yesterday. Just as a child should celebrate getting an additional word correct in their spelling over last week, you should celebrate your victories even if they aren’t immediate success. Coding will be an infinitely more rewarding experience if you open yourself to the struggle of challenges that you may not conquer the first time.</p><p>Everyone’s story is different, so don’t let your narrative be “Look what you can’t do”.</p><p>Let it be “Look how far you have come”.</p><p>[1] Popova, M. (2021, August 31). <em>Fixed vs. growth: The two basic mindsets that shape our lives</em>. Brain Pickings. Retrieved September 20, 2021, from <a href="https://www.brainpickings.org/2014/01/29/carol-dweck-mindset/">https://www.brainpickings.org/2014/01/29/carol-dweck-mindset/.</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9714482b3a4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>