<?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 Hugh Burgess on Medium]]></title>
        <description><![CDATA[Stories by Hugh Burgess on Medium]]></description>
        <link>https://medium.com/@hughburgess?source=rss-ee139994f7d2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*7PJ9IG7O-eK0i-zJ.jpg</url>
            <title>Stories by Hugh Burgess on Medium</title>
            <link>https://medium.com/@hughburgess?source=rss-ee139994f7d2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 23:06:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hughburgess/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[BiteSize 4: Building a CSV to JSON converter]]></title>
            <link>https://hughburgess.medium.com/bitesize-4-building-a-csv-to-json-converter-cba0f93c358e?source=rss-ee139994f7d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/cba0f93c358e</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Hugh Burgess]]></dc:creator>
            <pubDate>Sat, 10 Jun 2023 11:02:32 GMT</pubDate>
            <atom:updated>2023-06-10T11:02:32.764Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uiRgsCcmFUcQR0_vCumG3g@2x.jpeg" /><figcaption>Photo by Alexandru Acea on Unsplash</figcaption></figure><p>Hey folks, here’s a useful snippet of code I created during the week to convert a CSV (Comma Seperated Values) to a JSON object.</p><p>This is useful when working with excel spreadsheets and you want to use the data in the table.</p><p>You can also do these online but I find building a custom one to be of far more use and learnt a lot along the way.</p><p>First, save the excel file as a .csv file and drag into your project. In this example, it is saved in the <em>csvFilePath</em> declaration below. Create an empty JSON file which will serve as the destination of the conversion.</p><pre>const fs = require(&#39;fs&#39;)<br>const csv = require(&#39;csv-parser&#39;)<br>  <br>const csvFilePath = &#39;src/system/csv/data.csv&#39;<br>const jsonFilePath = &#39;src/system/json/data.json&#39;<br>  <br>const results = []<br>  <br>fs.createReadStream(csvFilePath)<br>.pipe(csv({ separator: &#39;;&#39; }))<br>.on(&#39;data&#39;, (data) =&gt; results.push(data))<br>.on(&#39;end&#39;, () =&gt; {<br>const jsonData = JSON.stringify(results, null, 4)<br>fs.writeFileSync(jsonFilePath, jsonData)<br>console.log(&#39;CSV file successfully converted to JSON.&#39;)<br>})</pre><p>Afterwards you can run it with <em>node path/to/converter.ts </em>and your csv file which is the <em>csvFilePath</em> will convert and appear in your <em>jsonFilePath</em> as defined at the start of the converter.</p><p>Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cba0f93c358e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BiteSize 3: The usefulness of a Staging branch]]></title>
            <link>https://medium.com/swlh/bitesize-3-the-usefulness-of-a-staging-branch-a46550cb6239?source=rss-ee139994f7d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/a46550cb6239</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Hugh Burgess]]></dc:creator>
            <pubDate>Fri, 12 May 2023 10:43:31 GMT</pubDate>
            <atom:updated>2023-05-12T10:43:31.943Z</atom:updated>
            <content:encoded><![CDATA[<h4>How to safely implement this extra step to ensure safe testing</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*seyuf1zZFKTo7nvr7mqhqA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@thisisengineering?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">ThisisEngineering RAEng</a> on <a href="https://unsplash.com/photos/uyfohHiTxho?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>Hey folks, so I wanted to share with you another small BiteSize info for your week — how to safely set up and use a staging branch before you merge changes to your main/master branch.</p><p>Staging branches and environments can ensure a safe space for yourself and your customers to see changes before they go “live” and don’t interfere with your main branch and environment.</p><p>Our good friend ChatGPT has this to say about Staging branches:</p><blockquote>A staging branch is a separate branch in a version control system that is used to test and review changes before they are merged into the main branch (usually called “master” or “main”). This branch is typically used for pre-production testing and is useful in a few ways:</blockquote><blockquote>1. Testing: Changes made in a staging branch can be thoroughly tested without affecting the stability of the main branch. This allows developers to ensure that the changes work as expected and don’t introduce any new bugs.</blockquote><blockquote>2. Collaboration: Multiple developers can work on the staging branch simultaneously, allowing them to collaborate on features and changes in a controlled environment.</blockquote><blockquote>3. Review: Changes made in the staging branch can be reviewed by other developers, stakeholders, or testers before they are merged into the main branch. This can help catch any issues or oversights before they make it to production.</blockquote><blockquote>Overall, a staging branch is a useful tool for ensuring that changes to a codebase are thoroughly tested and reviewed before they are released into production.</blockquote><p>Setting one up is rather simple — checkout your main branch and then from there <strong>git switch -c staging </strong>to clone the current main branch, create a new branch called “staging” and move to that branch. Then push that branch to your remote in GitHub or GitLab or whereever you have your remote branches, and then any new branches can first be merged into the staging branch and tested there, run deployments out of staging first instead of out of main.</p><p>NOTE: <em>Never </em>merge your Staging branch into other branches, it should be treated as having incoming branches only and should be ready to be deleted if needs be.</p><p>If the staging branch is buggy or breaks, you can always delete it and clone again from the main branch. This way you ensure that you are creating a cloned environment to test branches before they are merged again into main, so remember to not delete branches on merge into staging, as they will be needed again for the real merge into main!</p><p>That’s all, have a good day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a46550cb6239" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/bitesize-3-the-usefulness-of-a-staging-branch-a46550cb6239">BiteSize 3: The usefulness of a Staging branch</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BiteSize 2: Fading opacity on an item when scrolling]]></title>
            <link>https://medium.com/swlh/bitesize-2-fading-opacity-on-an-item-when-scrolling-ab5a047dba75?source=rss-ee139994f7d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab5a047dba75</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[tips-and-tricks]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Hugh Burgess]]></dc:creator>
            <pubDate>Sat, 29 Apr 2023 20:11:41 GMT</pubDate>
            <atom:updated>2023-04-29T20:11:41.594Z</atom:updated>
            <content:encoded><![CDATA[<h4>Or.. How to make a cool scrolling effect!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KxySYHmTupZBuXjkb7ht6Q.jpeg" /><figcaption>- Christopher Gower (<a href="https://unsplash.com/photos/m_HRfLhgABo">Unsplash</a>)</figcaption></figure><p>Hey folks, here’s a little snippet to have a div appear as you scroll it into view, starting from opacity 0 to 1 around halfway on the screen (the <em>viewport</em>, what the user sees) and then when they keep scrolling the div is on full opacity, unless scrolling back and the div disappears again.</p><p>Some of the values are specific to the work I was building so you can adjust them to your liking:</p><pre>const [opacity, setOpacity] = useState(0)<br>const previousOpacity = useRef(0)<br>const myBoxRef = useRef(null)<br><br>const handleScroll = useCallback(() =&gt; {<br>const element = myBoxRef.current<br>if (!element) return<br>  <br>const rect = element.getBoundingClientRect()<br>const windowHeight =<br>window.innerHeight || document.documentElement.clientHeight<br>const threshold = windowHeight / 2 // &lt;--- halfway point<br><br>let newOpacity<br>if (rect.top &lt;= threshold &amp;&amp; rect.bottom &gt;= threshold) {<br>newOpacity = 1<br>} else if (rect.top &lt; (isLarge ? -100 : -250)) {<br>newOpacity = 0<br>} else {<br>newOpacity = (windowHeight - rect.top) / threshold<br>}<br><br>if (newOpacity !== previousOpacity.current) {<br>setOpacity(newOpacity)<br>previousOpacity.current = newOpacity<br>}<br>}, [])<br>  <br>useEffect(() =&gt; {<br>handleScroll() // Initial check<br>window.addEventListener(&#39;scroll&#39;, handleScroll)<br>return () =&gt; {<br>window.removeEventListener(&#39;scroll&#39;, handleScroll)<br>}<br>}, [handleScroll])<br><br>...<br><br>&lt;div ref={myBoxRef} style={{ opacity }}&gt;<br>&lt;p&gt;fade mee!&lt;/p&gt;<br>&lt;/div&gt;</pre><p><strong>NOTE</strong>: The <em>isLarge</em> variable could be a check to see if your viewport is desktop size or mobile size when the width of the viewport is examined.</p><p><em>Til next time!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab5a047dba75" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/bitesize-2-fading-opacity-on-an-item-when-scrolling-ab5a047dba75">BiteSize 2: Fading opacity on an item when scrolling</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BiteSize 1: Detect Scrolling and Setting Conditional Renders]]></title>
            <link>https://medium.com/swlh/bitesize-1-detect-scrolling-and-setting-conditional-renders-2277370d5678?source=rss-ee139994f7d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2277370d5678</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Hugh Burgess]]></dc:creator>
            <pubDate>Thu, 23 Mar 2023 13:56:22 GMT</pubDate>
            <atom:updated>2023-03-23T13:56:43.203Z</atom:updated>
            <content:encoded><![CDATA[<h4>or how to set a Boolean when scrolling occurs in a certain area</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ESjBg8sVpSmVRvjZ66Tcfg.jpeg" /><figcaption>source: <a href="https://unsplash.com/photos/1qR3LdlKwpA">Unsplash</a></figcaption></figure><p>Hello everyone! Here is the start of a new series I’ve been thinking of, where I jot down a little code which I found to be super useful in my week, and is hopefully not complex enough to understand.</p><p>Today I’ll show you an example of how to detect scrolling in the first 100 pixels, and conditionally render something as a result. This is a real working example which I used where I had a button I only wanted to be visible when I was at the very top of the page.</p><pre>import { useEffect, useState } from &#39;react&#39;<br><br>function MyComponent() {<br>  const [scrolled, setScrolled] = useState(false)<br><br>  useEffect(() =&gt; {<br>    const handleScroll = () =&gt; {<br>      const scrollY = window.scrollY<br>      if (scrollY &gt; 100) {<br>        setScrolled(true)<br>      } else {<br>        setScrolled(false)<br>      }<br>    }<br><br>    window.addEventListener(&#39;scroll&#39;, handleScroll)<br><br>    return () =&gt; {<br>      window.removeEventListener(&#39;scroll&#39;, handleScroll)<br>    }<br>  }, [])<br><br>  return (<br>    &lt;div&gt;<br>      {scrolled ? (<br>        &lt;p&gt;You have scrolled more than 100 pixels!&lt;/p&gt;<br>      ) : (<br>        &lt;p&gt;Keep scrolling...&lt;/p&gt;<br>      )}<br>    &lt;/div&gt;<br>  )<br>}</pre><p>In this code snippet, we use the `useEffect` hook to add a scroll listener to the window. Whenever the user scrolls, we check the `window.scrollY` value and update our `scrolled` state accordingly. We also clean up the listener when the component unmounts.</p><p>In your actual implementation, you might want to customize the threshold value (`100` in this case), or use a debounced version of `handleScroll()` to improve performance.</p><p>That’s it! Til next time :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2277370d5678" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/bitesize-1-detect-scrolling-and-setting-conditional-renders-2277370d5678">BiteSize 1: Detect Scrolling and Setting Conditional Renders</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SideStories XIX: h3ll0_w0r1d]]></title>
            <link>https://medium.com/swlh/sidestories-xix-h3ll0-w0r1d-d9f05fd36aec?source=rss-ee139994f7d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9f05fd36aec</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Hugh Burgess]]></dc:creator>
            <pubDate>Sun, 19 Feb 2023 12:49:10 GMT</pubDate>
            <atom:updated>2023-02-19T12:49:10.393Z</atom:updated>
            <content:encoded><![CDATA[<h4>Notes from a developer from self-taught to fully employed</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EO13xCnssv4NC3Kz3NH5tA.jpeg" /></figure><p>Hello world! It’s been a minute.</p><p>Little update: Due to popularity, I’ve updated my entry <a href="https://medium.com/swlh/sidestories-iix-github-git-and-terminal-995a50b74b1e">“SideStories IIX: GitHub, Git and Terminal”</a> with some new bits and bobs to help you understand the basics of Git and the git workflow.</p><p>I want to thank everyone who continues to read my blog entries and get those who also want to get started as a developer, I remember the sweat and tears and many hours a night (up to 15 hours a day), being motivated by the sheer lust for learning all the new methods and principles, it’s worth it! Keep going!</p><p>I have now gained some real-world experience in the domain of web development since self-teaching and blogging along the way here with FreeCodeCamp, I worked in a big teach company for a year, it was a great base to learn so much and the onboarding (getting used to how things are done, learning the systems) process was fantastic, it was like working in a library where you can take any book you want home to read and digest.</p><p>I also learned about good work ethics like when you’re ten hours into a problem and you need to let it go because it’s the wrong approach, you need to be able to let those hours go and not be frustrated by it. Don’t take your work home with you! Leave the bugs at work, you will be fresh the next day to attack them from a new angle.</p><p>Since August 2020 when I wrote my first blog entry and promised myself to take this path, I’ve never looked back. I’ve found so much purpose in my professional career, I deal with issues and bugs in the morning and by the end of the day, the code runs, the components work, something has been accomplished and I feel so much gratitude to have gone through the grind to get there and learn from it.</p><p>I would highly recommend you keep a diary of some kind online (I use a private repo on GitHub) to track progress and update it with something you found interesting in your day, something that challenged you, a hack you learned, a little piece of knowledge from a fellow dev or team lead. Slowly, you build your own little library that you can reference in the next issue you face, building your arsenal to tackle the next bug in future. I would recommend getting into <a href="https://obsidian.md/">Obsidian</a>, it’s a brilliant software for just that, and has been a strong contender to the diary I had going manually.</p><p>Since the end of 2022 I started at a fantastic tech company, the working atmosphere is top-tier, the people genuinely care and look out for each other, which in turn shows in the quality of code. Like any functioning relationship, communication is key and here I have learnt the value of communicating issues which otherwise would make you feel like your lacking or struggling alone. Your peers can and should help you, guide you and support you as you work through those hard tasks, bringing forth a sense of community. I have also learned the meaning of a good team lead, who acknowledges that you have faults, but doesn’t exploit them, and instead motivates and creates other team leaders in their team.</p><p>I think I might start adding a little insider tip here and there to this blog, something that you can use, something that I found to be the most interesting thing in the week that I learned, as a small 1 minute chunk of gold for you all. Let’s see!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d9f05fd36aec" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/sidestories-xix-h3ll0-w0r1d-d9f05fd36aec">SideStories XIX: h3ll0_w0r1d</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SideStories XVIII: 3Mp10YM3Nt.exe]]></title>
            <link>https://hughburgess.medium.com/sidestories-xviii-3mp10ym3nt-exe-81c5b52865b5?source=rss-ee139994f7d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/81c5b52865b5</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[sidestory]]></category>
            <category><![CDATA[employment]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[motivation]]></category>
            <dc:creator><![CDATA[Hugh Burgess]]></dc:creator>
            <pubDate>Sun, 11 Jul 2021 17:14:41 GMT</pubDate>
            <atom:updated>2021-07-11T17:14:41.387Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone! It’s been a good while since I wrote here as my focus moved away from following the FreeCodeCamp structure, I was learning at a faster pace that I couldn’t keep up with here, and I was working on my final project, a social networking app for dog lovers called “Walkers &amp; Talkies” which you can see <a href="https://shielded-tundra-69796.herokuapp.com/">here</a>.</p><p>I was applying to jobs since May after my graduation from Neue Fische and I landed a job as a Junior Software Developer! It’s been a crazy journey right from day zero here on Medium right up to today. I’m super excited to get into this new path and begin a meaningful career.</p><p>All in all, I started learning alone in August last year, lost my job in February and focussed on coding full time, joining the campus in March, graduated in May now here I am about to wear clothes that are my own, in an office space that doesn’t have drills or loud music or factory lights or the smell of cleaning cupboards.</p><p>If you’re reading this and wanting to get started in coding I can only say dive right in, you will always be learning and be comfortable with being stuck, you can find anything online to help and there is plenty on YouTube and StackOverflow. Take that first step!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=81c5b52865b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SideStories XVII: NeuE_f15He.exe]]></title>
            <link>https://hughburgess.medium.com/sidestories-xvii-neue-f15he-exe-6587c7525381?source=rss-ee139994f7d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/6587c7525381</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[sidestory]]></category>
            <category><![CDATA[neue-fische]]></category>
            <category><![CDATA[updates]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Hugh Burgess]]></dc:creator>
            <pubDate>Sat, 13 Mar 2021 15:35:10 GMT</pubDate>
            <atom:updated>2021-03-13T17:47:14.609Z</atom:updated>
            <content:encoded><![CDATA[<h3>SideStories XVII: N3uE_f15He.exe</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*btlQdywHS6UdZcWobg2ZPQ.jpeg" /></figure><p>Hello all! I hope you are all well, it’s been a hot minute since I last wrote here, as I’ve been busy working in this new bootcamp that I joined up with since the beginning of March, at <a href="https://www.neuefische.de/en"><em>Neue Fische</em></a> (German for New Fishes) here in Hamburg.</p><p>I spoke with the teacher yesterday and he allowed me to talk about my journey here with you all within reason, so I’ll just keep it short and sweet.</p><h4>New Directions</h4><p>The bootcamp has been excellent so far, we started at the very basics of Web Development, looking at HTML and CSS, getting comfortable with File Systems between Git and GitHub. All classes thus far are over Zoom because of COVID-19 regulations, so we’d meet online in the morning and discuss the previous day as a summary, or protocol, then dive into the work.</p><p>I’m glad to say that I am competent with what we are learning, thanks to blogging my process here and working with <em>FreeCodeCamp</em> since last August. That has been my biggest advantage when tackling new directions and subjects within the course. Additionally, I can provide insights and help others to clear up little stumbles, which makes me happy! We also take regular breaks which is great as I can be at home, which makes for a great change from commuting in previous jobs.</p><h4>The Workflow</h4><p>The workflow has been intense to say the least, I’ve been clocking in an average of 12 hours a day on the computer (last night I reached 17 hours!), constantly moving and growing and implementing what we learn along the way. I think this has been of great personal growth as I can prepare for future projects more efficiently and handle heavier workflow. However, I thrive under pressure so I have been enjoying every minute of the stress!</p><p>Each weekend we are tasked with building a website or applying what we learn that week in a small project, and I can see my progress in the results of my work. Thus far I’ve made a <a href="https://personal-website-ruby-beta.vercel.app/">personal website</a> which is Mobile, iPad and Desktop compatible (different layouts for each, thanks Media Queries) and also a small <a href="https://quiz-app-hugh-dwzkeym1k-hugh-burgess.vercel.app/">Quiz App</a> last weekend, with an extra logout page I made, cause why not?</p><p>In class, I try to keep spirits up and help out where I can, this could also be seen as a key part in building a good healthy framework for team projects. This leads us to the next chapter:</p><h4>Working in Teams</h4><p>In our most recent project, we were tasked with building an app with several pages and specific layouts (pure HTML and CSS) over the weekend. This marks my first time as part of a team in a project, contributing to a repo over GitHub, and working on separate moving parts of the same machine.</p><p>This was announced on the Thursday before so we had that evening to prepare and plan, figure out the tasks and what parts of the structure to set out first. We were a team of 4, so we split into 2 and each half carefully worked in separate areas so as not to cause conflicts within the code. This came in very handy when merging our branches over GitHub and creating consistent, precise Pull Requests.</p><p>We used ‘Pair Programming’ — where one dictates the parameters of each element and the other writes into the code, a sort of pilot/co-pilot approach. This was useful for efficiency and pace of the project build.</p><p>I thoroughly enjoyed working as part of a team. Communication is key and we maintained consistency by messaging each other over Slack as well as outside of working hours, keeping up to date on issues and potential blocks. We also shared a great chemistry so the work was halved already!</p><p>—</p><p>All in all, I’m loving this course and would recommend you give Neue Fische a look online. <br>Normally where I’d be panicked or feeling drained, or that gut feeling that tells you to get out, I haven’t had any of this. I really feel like I’m right where I ought to be!</p><p>I hope this encourages you to keep going in what you’re doing, coding is an invaluable talent which when you grind over eventually you get the diamonds. Keep grinding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6587c7525381" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SideStories XVI: b00tC4mp.exe]]></title>
            <link>https://hughburgess.medium.com/sidestories-xvi-b00tc4mp-exe-71f11f424527?source=rss-ee139994f7d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/71f11f424527</guid>
            <category><![CDATA[updates]]></category>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Hugh Burgess]]></dc:creator>
            <pubDate>Mon, 01 Mar 2021 18:32:45 GMT</pubDate>
            <atom:updated>2021-03-01T18:32:45.527Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey yall, I’ll be going for a bit of radio silence as I’m now enrolled in an online bootcamp course the next 12 weeks. Hopefully I’ll have time to do the odd blog now and then.</p><p>See you soon!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71f11f424527" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning to Code: Day 57 — JavaScript: ES6 Part 4]]></title>
            <link>https://medium.com/swlh/learning-to-code-day-57-javascript-es6-part-4-67d301c69120?source=rss-ee139994f7d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/67d301c69120</guid>
            <category><![CDATA[freecodecamp]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[es6]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Hugh Burgess]]></dc:creator>
            <pubDate>Tue, 23 Feb 2021 16:14:50 GMT</pubDate>
            <atom:updated>2021-02-23T23:28:42.167Z</atom:updated>
            <content:encoded><![CDATA[<h3>Learning to Code: Day 57 — JavaScript: ES6 Part 4</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IoqhqksPyD4jW8UezzuXdQ.jpeg" /></figure><p>Good morning all! Hope we are all keeping well, had a lot of fun yesterday learning about <em>Destructuring</em>, let’s continue with more <em>ES6</em> features of <em>JavaScript</em> and thanks as always to <em>FreeCodeCamp</em> for the lessons!</p><p>—</p><h4>Create Strings using Template Literals</h4><p>Oh wonderful! Finally something I’ve seen online that I’ve always wanted to know, incoming big itch about to get scratched!</p><p><em>Template Literals</em>. What are they? Well, when we create strings with <em>string interpolation </em>(where <strong>placeholders</strong> are set in a <strong>string</strong> and later replaced with their desired <strong>values</strong>), we connect a template <strong>string</strong> sentence together with our key variable words slotted in the placeholders for the end result of a whole sentence.</p><p>For example you have a database of <strong>names</strong> and <strong>ages</strong>, and you don’t want to write out “Hello, my name is (enter <strong>name</strong> variable here) and I am (enter <strong>age</strong> variable here) years old” a hundred thousand times, you can simply use a <em>Template Literal </em>which is included as a new nifty feature of<em> ES6</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*mHoKkDQk2zkcuWZy6TLD7g.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p><strong>Note</strong>: Watch out for the <em>backticks</em> “ <strong>`</strong> ” in the <strong>string</strong> at the start and end to wrap it, <em>not</em> single/double quotes. The placeholders are seen as <strong>${}</strong> so no concatenation (+) is needed between <strong>string</strong> and variables and the <strong>string</strong> is multi-line, so it’s written over two lines of code and appears over two lines in the <strong>console</strong> also. This saves using the <strong>\n</strong> within strings.</p><h4>Writing Concise Object Literal Declarations with Object Property Shorthand</h4><p>Yes it’s a bit of a mouthful but let’s see how ES6 helps us define <em>object literals</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/403/1*5Ezbc4Sdqn4KO2ai24nWOA.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p>Rather than having to write <strong>x:x</strong> and <strong>y:y</strong>, we can simply write it once as <strong>x,y</strong> and rewrite as an <strong>arrow</strong> function also:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*0t6lExMGfHYinBWcQwDOJw.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p>This is what <em>object property shorthand</em> looks like. Nice and clean and simple.</p><h4>Writing Concise Declarative Functions in ES6</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/469/1*qYcn_WoAk-3uXMqeSY4HXw.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p>Take a look at this chunk of code. Notice that cheeky little <em>template literal </em>too (with the placeholder containing the <strong>name</strong> value). What can be simplified here? Have a little think.</p><p>Yes, the <strong>function</strong> keyword! In <em>ES6</em> we don’t need it or the preceding colon just beforehand, we end up with this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*V9SdEBWurT90_0U9UVhDEg.png" /><figcaption>-FreeCodeCamp</figcaption></figure><h4>Defining a Constructor Function with the Class Keyword</h4><p>No we’re not referring to the <strong>class</strong> keyword in <em>HTML</em>, this one is different. In <em>ES6</em>, the <strong>class</strong> keyword is <em>just syntax</em>, but can be used to create <strong>objects</strong>. It declares a <strong>function</strong>, to which a <strong>constructor</strong> is added inside.</p><p>What is a <strong>constructor</strong>? Well, according to <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/constructor">MDN Web Docs</a>:</p><blockquote>The constructor method is a special method for creating and initializing an object created with a class.</blockquote><blockquote>There can only be one special method with the name “constructor” in a class. A SyntaxError will be thrown, if the class contains more than one occurrence of a constructor method.</blockquote><p>Let’s take a look at a typical <strong>constructor</strong> <strong>function</strong> which uses <strong>new</strong> as a keyword to <em>instantiate</em> (to represent) an <strong>object</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*hRomgxiJExRy3N-u7kBpvg.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p>The <strong>class</strong> keyword then replaces the <strong>constructor</strong> <strong>function</strong> creation, note how things move around a bit in this new form:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*IxY2VHdFcCvSDDuqHciOpw.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p><strong>Note</strong>: See how the <strong>class</strong> keyword declares a <strong>function</strong>, to which a <strong>constructor</strong> is added, as said before. <strong><em>UpperCamelCase</em></strong> should also be used for declaring ES6<strong> class</strong> names (see <strong><em>SpaceShuttle</em></strong>, not <strong><em>spaceShuttle</em></strong>).</p><p>—</p><p>Aaand let’s keep it simple for today, headaches averted. Phew! Thanks guys, I’ve seen alot of support come through <a href="https://medium.com/@thestartup_"><em>The Startup</em></a><em> </em>here on Medium so I just wanna give them a wee shoutout and say thanks for supporting me! Catch you all next time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67d301c69120" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/learning-to-code-day-57-javascript-es6-part-4-67d301c69120">Learning to Code: Day 57 — JavaScript: ES6 Part 4</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning to Code: Day 56 — JavaScript: ES6 Part 3]]></title>
            <link>https://medium.com/swlh/learning-to-code-day-56-javascript-es6-part-3-93e2c1d371d6?source=rss-ee139994f7d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/93e2c1d371d6</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[destructuring]]></category>
            <category><![CDATA[freecodecamp]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Hugh Burgess]]></dc:creator>
            <pubDate>Mon, 22 Feb 2021 13:04:42 GMT</pubDate>
            <atom:updated>2021-02-22T20:37:30.822Z</atom:updated>
            <content:encoded><![CDATA[<h3>Learning to Code: Day 56 — JavaScript: ES6 Part 3</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FgPdG2k7_uK-49xh6ZKz1g.jpeg" /></figure><p>Hello everyone! Hope you all had a lovely weekend, and feeling rested and ready to join me learning more of ES6 with <em>FreeCodeCamp</em>, let’s jump back in and take a look into the <em>Destructuring Assignment</em>..</p><p>—</p><h4>Extracting Values from Objects with the Destructuring Assignment</h4><blockquote><strong><em>Destructuring assignment</em></strong> is a syntax that allows you to assign object properties or array items as variables. This can greatly reduce the lines of code necessary to manipulate data in these structures. There are two types of destructuring: Object destructuring and Array destructuring.</blockquote><blockquote>- <a href="https://www.digitalocean.com/community/tutorials/understanding-destructuring-rest-parameters-and-spread-syntax-in-javascript">digitalocean.com</a></blockquote><p>We all remember how to get to the value of an object by parsing through the <strong>Dot Notation</strong> right? We would have to go through a path of <em>variable.object.key</em> to see the <strong>value</strong> as the result, which looks a bit like this on line 2 and 3:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*OT8loZm9y1GyvomvvHTmTg.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p>Here, we have an <strong>object</strong> called <strong>user</strong> and two <strong>keys</strong> (<strong>name</strong> and <strong>age</strong>) of that <strong>object</strong>, defined with <strong>values</strong> as <strong>John</strong> <strong>Doe</strong> and <strong>34</strong>, respectively.</p><p>Well, ES6 introduced a cleaner way to present the data with a simple line of code, OCDers rejoice! Taking <strong>values</strong> directly assigned to the <strong>object</strong> with the same original assignment as above using<em> destructuring </em>syntax looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/338/1*Fp1LvZnGQNpsPPc9cEorBQ.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p>So rather than typing out multiple lines to define separate <strong>values</strong>, we define <em>all</em> the variables assigned to the <strong>object</strong> in one clean line of code.</p><h4>Using Destructuring to Assign Variables from Objects</h4><p>We can take a variable and rename it within the curly brackets {} of the syntax using the example above, and overwrite it to our new variable names:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*80X-NCXIHEK7F-CBimIhdQ.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p>This is to say that we go through <strong>user.name</strong> and rename that corresponding <strong>value</strong> of “<strong>John Doe</strong>” to <strong>userName</strong> and so on without the need for extra lines of code to do this.</p><h4>Assign Variables in Nested Objects</h4><p>If we want to assign a name to a variable, like above, but this variable is nested within an object itself, like below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*CJLYSR6k_M8A7JXvSMYbAA.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p>Here we have the top-level <strong>object </strong>called <strong>user</strong> and its nested <strong>object </strong>called <strong>johnDoe</strong> with two <strong>properties</strong> (2 <strong>keys</strong> that are<strong> age</strong> and <strong>email</strong>, and two <strong>values</strong> called <strong>34</strong> and ‘<strong>johnDoe@freecodecamp.com</strong>’).</p><p>So first, let’s look at how to extract the <strong>values</strong> from the nested <strong>object</strong> properties and assign them to variables of the same name, as we tried in the first chapter today:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/427/1*qLpItkLniga5g7O8A2QsLQ.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p><strong>Note</strong>: Here we simply add curly brackets within the outer curly brackets, which act as the nested object inside the top-level object.</p><p>Renaming the <strong>value</strong> variables in the nested object is then a simple <em>oldName : newName</em> using <em>destructuring </em>in the above example, seen here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*mA8o9ky0ksQZOyyexmLoPw.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p>In this one line of code, we have extracted the <em>nested</em> <strong>object</strong> <strong>values</strong> from a top-level <strong>object</strong> previously declared as <strong>user</strong>, and assigned them new variable names. Simple.</p><h4>Assigning Variables from Arrays</h4><p>So we’ve looked at Objects, now what about Arrays? The thinking is the same and the code just as simple.</p><p>One key difference between the <em>spread operator</em> and <strong>array</strong> <em>destructuring</em> is that the <em>spread operator</em> (“…”) unpacks the <strong>array</strong> into a <em>comma separated list</em>. As a result, we cannot pick and choose which elements we want to assign to variables. However <em>destructuring</em> does this. Consider this example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*6syrDYlg9vc_ljOOSxjlrw.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p><strong>a</strong> is assigned to the first index (1), <strong>b</strong> to the second index (2), and so on. If we imagine these <strong>values</strong> as larger <strong>value</strong> names, this could be very time consuming, however with <em>destructuring</em> we can quickly parse through the index, with a <strong><em>comma for each index</em> </strong>to land exactly where we want in the <strong>array</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/1*v9ZubhTBsrPa3MIVXSfokg.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p><strong>Note</strong>: See the commas between <strong>b</strong> and <strong>c</strong> which specifies “comma, jump two times (3 and 4)” to get the index element <strong>c </strong>(5).</p><p>If we wanted to take the <strong>values</strong> of two variables and swap them, we could do it simply like so with <em>Array Destructuring</em>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*CfgCg-968YBdIhIYzaKjqg.png" /><figcaption>-FreeCodeCamp</figcaption></figure><h4>Using Destructuring with the Rest Parameter to Reassign Array Elements</h4><p>In some cases, we want to gather the ‘rest’ of the <strong>array</strong> and not the beginning of its index. This is similar to <strong>Array.prototype.slice().</strong> Let’s take a look at some code and break it down:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*sZaODFFRmIlKQLndoDUnIw.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p>On line 1, we declare the <strong>array</strong> variable <strong>source</strong>. This <strong>array</strong> contains 10 elements. Then on line 2 we declare a <strong>function</strong> called <strong>removeFirstTwo() </strong>with it’s argument called <strong>list</strong>.</p><p>Here in the <strong>statement</strong> of the <strong>function</strong>, we see our <em>rest parameter</em> in action with <em>destructuring</em> on line 4 where <strong>a</strong> = index element <strong>1,</strong> and <strong>b</strong> = index element <strong>2</strong>, then the <em>rest parameter </em>which gathers the ‘rest’ of the elements (<strong>3–10</strong>) and calls them <strong>arr</strong>. This is assigned to the function argument <strong>list</strong> and then <strong>returns</strong> the element <strong>arr</strong> on line 6 which ends the <strong>statement</strong> of the <strong>function</strong>, and next we give <strong>arr</strong> the same value as calling the <strong>function</strong> with <strong>source </strong>as it’s <em>argument</em> on line 8. Then we simply <strong>console.log(arr)</strong> on line 9 to reveal it’s result in the <strong>console</strong>.</p><h4>Using Destructuring to Pass an Object as a Function’s Parameters</h4><p>Remember when we wrote <strong>arrow</strong> functions, we took a variable and <strong>function</strong> with parameters and simplified it down:</p><blockquote>const profileUpdate = function(profileData) { (multiple object variables here) }</blockquote><p>We can destructure an <strong>object</strong> in a <strong>function</strong> argument itself. In this case the above is further shown with variables and uses an <strong>arrow</strong> function also:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*f4Wf-Ef2JplRncHXpGak1A.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p>Let’s destructure the <strong>object</strong> into the <strong>function</strong>’s parameters like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*uYk6Ja0ufKwLqtNGEVRx7g.png" /><figcaption>-FreeCodeCamp</figcaption></figure><p><strong>Note</strong>: The new positioning of the <strong>object</strong> variables given in the curly brackets “{}”, inside the <strong>function</strong>’s parameters “()”. This new structure of code says the same as the previous example with less coding needed.</p><p>When <strong>profileData</strong> is then passed into the <strong>function </strong>called <strong>profileUpdate</strong>, it’s <strong>values</strong> are <em>destructured</em> from the parameters of <strong>profileUpdate</strong> for use <em>within</em> the <strong>function</strong>.</p><p>—</p><p>Aaaand let’s leave it there for today. That covers all things <em>Destructuring</em>! Catch you next time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93e2c1d371d6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/learning-to-code-day-56-javascript-es6-part-3-93e2c1d371d6">Learning to Code: Day 56 — JavaScript: ES6 Part 3</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>