<?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 Theran Brigowatz on Medium]]></title>
        <description><![CDATA[Stories by Theran Brigowatz on Medium]]></description>
        <link>https://medium.com/@theran.brigowatz?source=rss-a62f424ecc92------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*w4CQbHHXWxYDjUho4IIRcw.jpeg</url>
            <title>Stories by Theran Brigowatz on Medium</title>
            <link>https://medium.com/@theran.brigowatz?source=rss-a62f424ecc92------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 23:37:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@theran.brigowatz/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[How to build a calculator with React Hooks and the React Context API]]></title>
            <link>https://medium.com/free-code-camp/building-a-calculator-with-react-hooks-and-react-context-api-debcabbc5f54?source=rss-a62f424ecc92------2</link>
            <guid isPermaLink="false">https://medium.com/p/debcabbc5f54</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[tech]]></category>
            <dc:creator><![CDATA[Theran Brigowatz]]></dc:creator>
            <pubDate>Thu, 14 Mar 2019 17:24:25 GMT</pubDate>
            <atom:updated>2019-04-01T17:12:04.179Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*rqZDBlph5lAF0kSO" /><figcaption>Photo by <a href="https://unsplash.com/@crissyjarvis?utm_source=medium&amp;utm_medium=referral">Crissy Jarvis</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>If you are like me, when you first heard of React Hooks you were maybe a little bit ambivalent or confused by what all the hype was about. What’s the big deal if I don’t have to write out class components anymore? However, once I dove in and got to using them, I couldn’t really see myself going back to my pre-Hook days. In the immortal words of Blues Traveller, “The hook brings you back. I ain’t tellin’ you no lie.”</p><p>For a while, I was looking for a guide about how to use Hooks in connection with the Context API. After only finding a few examples out there that explained the concept fully, I decided to do what any good developer should do: pore over the docs and build something myself. Struggling through it and learning it on your own is one of the best ways to absorb knowledge. This is a guide for how to build the same project that I did with the use of Hooks and Context.</p><h4>Overview</h4><p>This project is going to be a basic calculator app similar to the iPhone calculator. Since this is just a simple desktop app I have replaced the % button with a back button. Though I wouldn’t use this to take the SATs, you could definitely add up the number of toes you have on it.</p><p>There is a working <a href="https://calc-u-later.netlify.com/">deployed version</a> of the project, or you can view all of the code on <a href="https://github.com/theranbrig/calculator">GitHub</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0XzsNDAyjANtW7Q7dqCkQA.png" /><figcaption>Our application layout. Nothing too fancy here.</figcaption></figure><h3>The Project</h3><h4>Getting Started</h4><p>To get started we are just going to use create-react-app. You can get started by running the following:</p><pre>npx create-react-app calculator<br>cd calculator<br>npm start</pre><h4>File Structure &amp; CSS</h4><p>The file structure of the app should look like the following. In the src folder create the following files or just leave the App.js and index.js.</p><pre>src<br>├── App.js<br>├── index.js<br>└── components<br>    ├── BackButton.js<br>    ├── Calculator.js<br>    ├── ClearButton.js<br>    ├── Display.js    <br>    ├── EqualButton.js<br>    ├── FunctionButton.js<br>    ├── NegativeButton.js<br>    ├── NumberButton.js<br>    ├── NumberProvider.js<br>    └── styles<br>        └── Styles.js</pre><p>If you want to follow along exactly you can also install Styled Components for the CSS.</p><p>npm -i styled-components</p><p>You can then add the Styled CSS from <a href="https://gist.github.com/theranbrig/dbf478ac4c961d6c8a193de582420ce1">this link</a> to the Styles.js file or add your own.</p><h4>Main App Structure</h4><p>The Calculator.js file should setup the display and number pad. It should contain all of the button types.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e63e72f10d04355b2d1aee997df731b5/href">https://medium.com/media/e63e72f10d04355b2d1aee997df731b5/href</a></iframe><p>You will notice that all of the button components are added in here along with the number display. Each of the button components are essentially the same. They should all follow the same basic structure. The zero-button gets a separate div since we are using CSS Grid for the layout and it needs to span two columns. (PS — If you want to know more about CSS Grid I did a <a href="https://medium.com/@theran.brigowatz/gettin-griddy-with-it-build-your-own-css-grid-and-drop-the-frameworks-7d8c498c8b1b">little article</a> on the basics.)</p><p>You may notice that the buttonValue props is only needed for the NumberButton and FunctionButton components. Each of the buttons should follow the same basic structure with a unique name. You can reference the file structure up above to see which buttons are needed. The buttons should have the symbol written in the button component if they are not passed a buttonValue via props. Create one of these for each of the button types in your file structure.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9af81c06b62072859d878348e3129663/href">https://medium.com/media/9af81c06b62072859d878348e3129663/href</a></iframe><p>After this you should have the basic structure of a calculator. We are going to come back to the display in just a bit. Now we are going to get into the inner workings of the app and see how we can use our Hooks and Context.</p><h4>Building the Context API Provider</h4><p>We are now going to create the NumberProvider.js . This is the heart of your app and where our functions are going to live. If you have never used the React Context API it is a great tool to help pass data from one component to another.</p><p>Think of when you have components that are nested within each other. In the past you would have to “prop drill” . This is when you pass the data or function through as props in down through nested components. This is hardly ideal, especially when you start to go several layers deep.</p><p>However, with this provider component, it allows you to pass data to any nested component, no matter how deep. This number provider will wrap our App component. Now whenever we want to get data, or use a function that lives in the provider, it is globally available. This gets us out of having to “prop drill” through nested components. You maintain the single source of truth that is the essence of React. To get started you need to create the provider. It should look like the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f0986c02cdbdcecc83795bd61e7fe550/href">https://medium.com/media/f0986c02cdbdcecc83795bd61e7fe550/href</a></iframe><p>The basic provider is created and any value that is passed in is now available to all nested components. In order to make this available we are going to wrap our App component so it is globally available. Our App will have this code.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4b9e7dcb3fb076d95fe48b5c04c72ffa/href">https://medium.com/media/4b9e7dcb3fb076d95fe48b5c04c72ffa/href</a></iframe><h4>Using the Context Provider</h4><p>Now we can add in the code for our display. We can display the value by passing in the useContext function from the new React Hooks API. We no longer have to pass in prop through nested components. The display should look like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3502d7b2f584a9d4eced3b073a7c9254/href">https://medium.com/media/3502d7b2f584a9d4eced3b073a7c9254/href</a></iframe><p>The number that you passed three levels up in the NumberProvider is immediately available to the Display component by calling useContext and passing our created NumberContext. Your number display is now up and running as it is showing number which we have set to zero.</p><p>Now of course our calculator is showing a single zero. This is great if you are counting the number of hours of sleep I get with a new born son, but not so great if trying to add anything else, so let’s use some hooks going get this calculator calculating.</p><h4>Getting Started with Hooks</h4><p>If you haven’t used a hook before, it essentially allows you to get rid of the class syntax, and instead have state within functional components. Here we can add the following to our NumberProvider.js file in order to create our first hook.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f05c4ceb11fdeba9a88c1fa1540ca33/href">https://medium.com/media/9f05c4ceb11fdeba9a88c1fa1540ca33/href</a></iframe><p>There might be some syntax you have not seen. Rather than writing out our class with state we break each part of state into its own smaller number variable. There is also setNumber which acts the same as setState function, but now works for a specific variable, and can be called when necessary. useState allows us to set an initial value.</p><p>We are now able to use this all in our function to pass the number button values into the display. In this app the calculator is using strings to get the input. There are checks to make sure that you can not have multiple . in your number and that you do not have series of zeroes to start your number.</p><h4>Building Button Components</h4><p>Now you can call this function using the Context API in any of the nested components.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4b858b02422dcd9ae1fcfc6b6601df7c/href">https://medium.com/media/4b858b02422dcd9ae1fcfc6b6601df7c/href</a></iframe><p>Now you have working string of numbers maker. You can see how you can start to inject the values that you set in the NumberProvider into the other components of the app via the useContext function. State and the functions that affect it are held in the NumberProvider . You just have to call in the specific context that you want.</p><p>You can start to see how this would be great as you start to add more complexity to your app. Say you want a user component to check that you are logged in to use special features. You can create a separate provider that holds the user data and makes that available any nested component.</p><p>We can continue to add in functions to our calculator and pass them to the proper component through the useContext function that is built in.</p><h4>Completed Provider Functions</h4><p>The completed NumberProvider is found below and contains the following functions that are used with hooks.</p><ul><li>handleSetDisplayValue sets the value that you are typing into the display. We are checking that it there is only one decimal in the number string and we are limiting the number length to 8 characters. Think of this as more a tip calculator than one to get you through your calculus exam. It takes in the buttonValue property in NumberButton.js .</li><li>handleSetStoredValue takes our display string and stores it so that we can enter another number. This is our stored value. It will be used as a helper function.</li><li>handleClearValue resets everything back to 0. This is your clear function. It will get passed to ClearButton.js.</li><li>handleBackButton allows you to delete your previously entered characters one at a time until you get back to 0. This belongs in the BackButton.js file.</li><li>handleSetCalcFunction is where you get your math function. It sets if you are adding, subtracting, dividing, or multiplying. It gets passed into the FunctionButton.js file and takes in the buttonValue property.</li><li>handleToggleNegative does just as the name implies. It allows you do so for either the display value or a stored value after a calculation. This of course goes in NegativeButton.js.</li><li>doMath does the Math. Finally. Since this is only a simple four function calculator it is just using simple switch function depending upon the functionType that we have in state. We are using parseInt since we are passing our number in as strings. Also we are rounding to only three decimal places, to make sure that we do not have crazy long numbers.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f0c3949836848bb42851ac5fdbf094a/href">https://medium.com/media/9f0c3949836848bb42851ac5fdbf094a/href</a></iframe><h4>The Finished Display</h4><p>You will also need a display. In this case it will show the number and the storedNumber along with your functionType. There are a few check such as showing a 0 when you have an empty string as a number.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2c0474619517d31875740939be81aecd/href">https://medium.com/media/2c0474619517d31875740939be81aecd/href</a></iframe><p>For brevity sake I am not going to include all of the button functions since they are pretty much the same as the NumberButton.js file above. Just be sure that you pass in a buttonValue prop when necessary, and that you are passing in the correct function from the above list.</p><h4>See All the Code</h4><p>If you would like to see the entire code for this project it can be found over in:</p><p><a href="https://github.com/theranbrig/calculator.">GitHub Repo</a></p><p><a href="https://calc-u-later.netlify.com/">Calc-U-Later Deploy</a></p><h3>Conclusion</h3><p>I hope that this clears up a bit about how React Hooks and the Context API can be used together. Using these built in React features offers several benefits.</p><ul><li>Simple to understand syntax and gets rid of the clutter of class components. No more super and constructors. Just a few clean variables.</li><li>Easier to set and use state within and across components. No more messy prop drilling through multiple component.</li><li>Eliminates need for Redux in small projects, where you don’t need to hold too much in complex state. You probably aren’t going to re-create Facebook with it, but it will do the job on small-scale apps.</li></ul><p>Please let me know your thoughts or if there are any issues that you come across in the code. Hopefully this shone a bit of light onto something that you may not have been familiar with before. React Hooks and Context are great ways to simplify your React apps and write cleaner code.</p><p>Check out more of my work and other projects at <a href="https://theran.co/">https://theran.co</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=debcabbc5f54" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/building-a-calculator-with-react-hooks-and-react-context-api-debcabbc5f54">How to build a calculator with React Hooks and the React Context API</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gettin’ Griddy With It: build your own CSS Grid and drop the frameworks]]></title>
            <link>https://medium.com/free-code-camp/gettin-griddy-with-it-build-your-own-css-grid-and-drop-the-frameworks-7d8c498c8b1b?source=rss-a62f424ecc92------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d8c498c8b1b</guid>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[css]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Theran Brigowatz]]></dc:creator>
            <pubDate>Sun, 13 Jan 2019 16:20:00 GMT</pubDate>
            <atom:updated>2019-05-07T16:46:02.919Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eiBWP1WwXipGhTyt" /><figcaption>Photo by <a href="https://unsplash.com/@dmpop?utm_source=medium&amp;utm_medium=referral">Dmitri Popov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Just about every front end developer’s journey starts with the basic HTML, CSS, JavaScript path. You start with the structure, make it look decent, and then make it do something. However, somewhere along the journey it is easy to get caught up in the world of CSS frameworks and gloss over some of the finer details.</p><p>Bootstrap comes along with its nice pretty grid, using just a few classes and a CDN to make that nice pretty mobile-responsive grid. And before you know it, you start reaching for that framework whenever you build a project that needs a grid layout. I often did the same, that is until I started “Gettin’ Griddy With It.”</p><p>What sent me down the road of learning CSS Grid was when I was trying to build up a site using Semantic UI React (the prettier and less vague Bootstrap.) However, when building up a grid, I couldn’t make two columns sit flush with each other, and ended up messing with every margin and padding rule under the sun, to override the styles the framework had built in. It was frustrating experience, and I spent more time messing with specificity rules than actually coding.</p><p>That’s where CSS Grid comes in. CSS Grid is a relatively new addition to CSS3 and boy is it a doozy. Having to go to an imported grid framework leads to a few issues:</p><ol><li>Increased files size. The more you import the larger your app becomes. At a point when speed is key, reducing your app file size is an incredibly important idea to consider. Rather than importing a framework, or relying on a slow CDN, you can build your own.</li><li>Less readable code. Those of you who have used a framework know the increasingly complex and vague class names that come along with it. Who doesn’t immediately recognize whatclass=&quot;col-6 col-md-4 col-sm-12&quot; stands for? Or who wants to end up writing div.ui.segment.inverted.stackable.desktop.twelve.mobile.sixteen in their CSS?</li><li>Less customization. The built in rules of a framework can be difficult to override. You may end up with long class names to get to the correct specificity, or end up with line after line of !important tags to create custom styles that override the framework. The magic of CSS Grid is that you can make your own, and customize it to your needs, rather than rely on others who didn’t have your project specifics in mind.</li></ol><h3>A Responsive CSS Grid</h3><p>CSS Grid is essentially a group of boxes that you can fit on a page. You can either use number units to size up the boxes, or relative sizes to make it more responsive. With the huge variety of screen sizes out there, this is a big plus. Let’s say that you want to create a layout of six divs and want them to be responsive with more columns for different screen sizes.</p><p>This is what it looks like unformatted as six divs in a container.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5h3SghNdZK_PzX-cYyO5uQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cSLRntIHmCMp_7_ny6aORQ.png" /><figcaption>Six divs in a container.</figcaption></figure><p>Rather than having to add classes for each of the break points, you can set the minimum size of the div in a grid, and then autofill with bigger responsive boxes by using the fr sizing property. You only have to add CSS Grid properties for the parent, and then the small-box divs will fill in automatically.</p><p>The CSS for the container is as below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AcoHcjoJG5jZmiQK5dCF8g.png" /><figcaption>Parent container CSS Grid — “minmax” was not recognized in VSCode’s spellcheck.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*HIgyPXzE7rG8oqQH5eFbGA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i_f847yDQqbM9chT4lPz9A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LP7pngcVvqhgfbH-egw9eA.png" /><figcaption>Mobile, Tablet, and Desktop views of the CSS Grid divs.</figcaption></figure><p>As you can see, you can create a simple responsive grid from just four lines of code. Couldn’t be easier, and all of your content is free to move around and shuffle as needed. No media queries are even necessary in this instance. From here you are free to customize the individual boxes in the Grid. It’s quite flexible for responsive layouts and sizes. Play around with it and watch the boxes move magically.</p><h3>Grid Areas</h3><p>The other reason that I would tend to reach for a framework grid was to use for various layouts on different devices. You may want components to move around, depending upon the screen size you are on.</p><p>Below is an example of site layouts that you may want on desktop and tablet. Changing this is quite simple. Though some don’t like the structure, you and use an ASCII-like templating structure for the Grid areas.</p><p>Let’s say that you have a basic page layout that has a header, sidebars, content and a footer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t9u3iFQd84ry0zbjjC7D8g.png" /><figcaption>Basic HTML for page layout.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*USHn58dGLUlH6IhHBmULxg.png" /><figcaption>Unformatted Grid with three columns as — grid-template-columns: 1fr 4fr 1fr;</figcaption></figure><p>The layout for the page without being formatted would look like this with a basic grid of three columns set to 1fr 4fr 1fr . The boxes will fill in to fit their allotted space within the grid. However if you want your page layout to be a more fluid and dynamic like below, you can use template-areas.</p><p>In order to get this desired layout you need to create template areas. You can think of it as a miniature ASCII map that shows where you want the boxes to go on a page.</p><p>In order to get the desktop layout you make your miniature map like in the grid-template-areas property. Each line holds a row and names for the corresponding columns for the layout. You can see that the header and footer sections will stretch along the entire columns that they are placed in. Also sidebars and content stretch across multiple rows, as you can see in the “map” area. This can then be made into any layout that you need by adding the grid-area property to the corresponding divs like on the far right picture. You can name these anything that corresponds to your project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k1ZpLklxjMzCafnhcd5lhw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*6BwAYbXGxfbduUgSYIk8Tg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*ytqAXhs0ks5AKtg2B9A_Jw.png" /></figure><p>In order to make it work on tablet view you simply need to make a media query and switch around the order in your template areas. Easily move around content for your desired view. (Note that this can lead to problems on screen readers if you have content out of order, so be sure that your content still reads logically.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6YvUv2MK17JTIhpgJx1EEA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*5HnAhdNeqi11ZlKhHZbhUQ.png" /><figcaption>Desktop and Tablet Views</figcaption></figure><h3>Conclusion</h3><p>This simple post definitely just scratches the surface of what you can do with CSS Grid. But I think the main thing to take away from this is that you shouldn’t be afraid of using CSS Grid. It really is quite simple, powerful, and lightweight once you get use to the new syntax. Go ahead and enjoy “Gettin’ Griddy With It.”</p><p>For more information on CSS Grid I highly recommend checking <a href="http://cssgrid.io./">http://cssgrid.io</a> taught by Wes Bos. It is a fantastic tutorial CSS Grid.</p><p>Also as you have questions be sure to check out the CSS Tricks site at <a href="https://css-tricks.com/snippets/css/complete-guide-grid/">https://css-tricks.com/snippets/css/complete-guide-grid/</a> to learn more about the grid.</p><p>To check out more of my work, visit <a href="https://theran.co/">https://theran.co</a> and learn more about me.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d8c498c8b1b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/free-code-camp/gettin-griddy-with-it-build-your-own-css-grid-and-drop-the-frameworks-7d8c498c8b1b">Gettin’ Griddy With It: build your own CSS Grid and drop the frameworks</a> was originally published in <a href="https://medium.com/free-code-camp">We’ve moved to freeCodeCamp.org/news</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript Tips for an ES6 World]]></title>
            <link>https://medium.com/@theran.brigowatz/javascript-tips-for-an-es6-world-ebfb4df88c52?source=rss-a62f424ecc92------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebfb4df88c52</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[es6]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Theran Brigowatz]]></dc:creator>
            <pubDate>Sun, 06 Jan 2019 06:55:07 GMT</pubDate>
            <atom:updated>2019-01-06T06:55:07.961Z</atom:updated>
            <content:encoded><![CDATA[<p>Below are a list of JavaScript features and methods that I wish I knew about when I started my coding journey (or they were not available in ES5 when I began my foray into coding.) I hope you can learn something new, and can use them in your JavaScript journey.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HJrK5zyKTx5mdOck" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Object Destructuring</h3><p>When working with large JSON data or large objects, it can often be difficult to break down the data, especially once you get into large nested data objects like a call to a weather API. When you do so, you can end up getting large back nested objects and arrays like the location information, current weather, forecast, etc. This can be difficult to manage and you end up with large dot notation chains to access object properties.</p><p>Object destructuring can help to alleviate some of those concerns. Imagine you get a JSON data object back like muppets below. Rather than having to call muppets.bert.age you can instead use object destructuring to call each name. By calling const { bert, ernie, grover, elmo } = muppets you can now call each nested object as it’s own variable.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1242a5e6f84d591d7123bbe61285c6e2/href">https://medium.com/media/1242a5e6f84d591d7123bbe61285c6e2/href</a></iframe><h3>New Sets</h3><p>I know when I first started using Code Wars sites, about half of them asked you to find unique data from arrays or strings. For example, does the following string “alphabet” contain all unique characters? Though there are numerous ways of attacking a problem like this, like putting the letters into an ordered array, sorting them, and comparing all characters to the previous index, this gets a bit tiresome and makes for lengthy functions.</p><p>That is where Set comes to the rescue. It takes and filters out any duplicate data, and returns a new set that has all unique data.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/70bb7e4e9fbe867c857fe5989440596b/href">https://medium.com/media/70bb7e4e9fbe867c857fe5989440596b/href</a></iframe><ul><li>Note that in the above example string1 has an “A” and an “a” which are distinct characters in JavaScript.</li></ul><h3>Spread Operator</h3><p>This one has become one of my favorites to use recently. The spread operator is written as three little dots ... and they do quite a bit of work. This has become especially useful when you are working with immutable.</p><p>You can easily turn a string into an array (useful on those algorithm sites and data manipulation) or used in combination with Set to get those unique characters into an array.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f6579bbc1a791d6936c45afd0ce943d4/href">https://medium.com/media/f6579bbc1a791d6936c45afd0ce943d4/href</a></iframe><p>The other common use that I have found is with objects. This one is particularly helpful when you want to update part of the data within an object. Here the spread operator works to to copy the properties over from the previous object, and then you can simply change the properties while keeping the rest of the data the same.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a881897ae27be3052cfb7a92ebf2c55c/href">https://medium.com/media/a881897ae27be3052cfb7a92ebf2c55c/href</a></iframe><h3>Array Methods</h3><p>Below is a list of methods that I commonly use. ES6 has made working with immutable data much easier and the following are some of the common ones that I have found useful in my day-to-day programming.</p><h4>.map</h4><p>This one gets used almost daily by me in React development. It returns a new array that you can work with and change, while keeping your original data intact.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/89faf1a29817bc09db649c260f7a7418/href">https://medium.com/media/89faf1a29817bc09db649c260f7a7418/href</a></iframe><h4>.filter</h4><p>This one basically does as it says. It filters out data and returns a new array based upon whatever criteria you set up for it.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e1fe278b276979e226d6f895edffb1bb/href">https://medium.com/media/e1fe278b276979e226d6f895edffb1bb/href</a></iframe><h4>.reduce</h4><p>I use this one a little less often than .filter and .map but it is quite useful whenever you need to add up some items or find totals. It is one of my go-tos when creating a shopping cart and I need to add up to get a sum.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/584b28dab92d278e25260ccb478ce14f/href">https://medium.com/media/584b28dab92d278e25260ccb478ce14f/href</a></iframe><h4>.some</h4><p>This one is helpful to check for the truthiness of an array. It checks to see if <em>at least one item</em> in an array passes your set criteria. This method does not return a new array, but rather simply checks for true or false.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f6c84eab34174868ca8f114b27f9828b/href">https://medium.com/media/f6c84eab34174868ca8f114b27f9828b/href</a></iframe><h4>.every</h4><p>Like the .some method, but this one checks that <em>every item</em> in the array is true under the criteria that you have set. This one again simply returns true or false.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba68c68d39e8067fc8129c498c78e0b6/href">https://medium.com/media/ba68c68d39e8067fc8129c498c78e0b6/href</a></iframe><h3>Thank You</h3><p>Thank you for taking the time to read through this little list of JavaScript tips. I hope you found something useful that you can use in your code and maybe make your life a bit easier. Check out my work at <a href="https://theran.co/">theran.co</a> or check me out on <a href="https://twitter.com/wellBuilt">twitter</a>. Happy Coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebfb4df88c52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sage Wisdom to Bootcamp Newbies and New Developers]]></title>
            <link>https://medium.com/@theran.brigowatz/sage-wisdom-to-bootcamp-newbies-and-new-developers-a0bb29b9b47b?source=rss-a62f424ecc92------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0bb29b9b47b</guid>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[bootcamp]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[bloc]]></category>
            <category><![CDATA[life-lessons]]></category>
            <dc:creator><![CDATA[Theran Brigowatz]]></dc:creator>
            <pubDate>Wed, 19 Dec 2018 15:37:18 GMT</pubDate>
            <atom:updated>2018-12-19T15:37:18.433Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jjxlgdWYy4jVa-f-" /><figcaption>Photo by <a href="https://unsplash.com/@markusspiske?utm_source=medium&amp;utm_medium=referral">Markus Spiske</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Making the decision to change careers in my 30’s was both one of the scariest and best decisions that I have ever decided to make. Along with learning a new and marketable skill, I have learned a lot about myself, and what I am capable of. Having finished up recently, I thought I would offer a few pieces of advice that I wish I would have known, or at least thought more about, when I first started out.</p><h3><strong>Before starting out a few disclaimers and information about myself:</strong></h3><ul><li>I am far from an expert. I have just finished my bootcamp recently and I am just beginning my job search. (Though hit me up if you need a Remote or Seoul-based developer.)</li><li>I am based outside of the Korea as an expat, and I went through an online bootcamp. I was working full time and had a wife who was pregnant for the majority of the time. My advice may not apply wholly to an intensive in person bootcamp.</li><li>I am a JavaScript developer, so most of what I have to say revolves around that.</li><li>There is no one right way to approach it. Go with what works for you.</li></ul><h3><strong>Prepare</strong></h3><p>Spend some time learning if even you like to code, and that it is for you, before jumping in. I spent the better part of a year learning the basics before I even enrolled in my bootcamp. I went in knowing HTML, CSS, and the basics of Javascript before I started. Although many boot camps will tell you that you will go from zero to hero, I couldn’t imagine trying to dive into a framework like React or Angular without the previous knowledge that I had. As someone with a teaching background, I believe in failing quickly and learning from trial-by-fire, but the more you prepare ahead of time, the more you will appreciate it. This also makes sure that you actually like to code, and aren’t just doing it with dollar signs in the eyes.</p><p>I know for me personally I benefited greatly from these courses:</p><p><a href="https://www.udemy.com/the-complete-javascript-course/">The Complete JavaScript Course</a></p><p><a href="https://www.udemy.com/the-web-developer-bootcamp/">The Web Developer Bootcamp</a></p><h3><strong>Be Ready To Work</strong></h3><blockquote><strong>“Never half-ass two things, whole-ass one thing.”</strong></blockquote><blockquote><strong>— Ron Swanson</strong></blockquote><p>I was working a full time job and in addition to that I was putting in 25–30 hours a week staring at code. Be sure that your loved ones know that you will have other priorities, and are supportive of that fact. Luckily both and my wife and I are homebodies and I could burrow if for weekends of coding. Dinners with friends and nights out will have to take a back seat. I think I went out to meet friends once during my entire bootcamp. I made coding my life and a priority. Now I probably overdid it a bit, but I had a goal in mind, I didn’t want to just be good, I wanted to be the best at it. It paid off in the end. When my assessor told me that I had made the best final project he had seen, I knew it paid off.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FLwdtMSGiQ0Ako%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fgiphy.com%2Fgifs%2Fmaid-in-manhattan-LwdtMSGiQ0Ako&amp;image=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FLwdtMSGiQ0Ako%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="245" frameborder="0" scrolling="no"><a href="https://medium.com/media/3858d8a2da07f58132c2e84d6914c487/href">https://medium.com/media/3858d8a2da07f58132c2e84d6914c487/href</a></iframe><h3>Know When To Quit</h3><p>I know that this one was the toughest for me, and the piece of advice I still need to most take for myself even now. I can’t tell you how many times my wife had to tell me to go to bed, or step away from the computer and actually take a break. Countless times of “Just 10 more minutes to fix this bug” that turned into two more hours of coding. Step away and take a break. Your brain does need breaks and you need to step away and give your brain time to reset. I had numerous “Eureka” moments in the shower, while exercising, or cooking. Don’t kill yourself over it all. It’s ok to fail, because that’s how we learn, but don’t let it consume you, or define you. Find that work-life balance. It’s ok to not have everything perfect. Go to bed and fix it in the morning.</p><h3>Make Your Stuff Look Good</h3><p>Looking at some of the other students projects I notice that most just went with the basic boilerplate styling or code. Branch out from Bootstrap and make your stuff look like it has some thought put into it and some personality. I would simply use a color coordination app like <a href="https://coolors.co/">Coolors</a> and then base my design around those simple five colors. Add a new font from <a href="https://fonts.google.com/">Google Fonts</a> and learn a new CSS Framework each time (they are easy.) Step out and learn SASS so you can add global colors and unified CSS settings with ease. Make your buttons stylish and actually do something when you hover or click on them. Ask yourself, would I want to use this?</p><p>Same applies to your READMEs. My mentor stressed that you have to make a good impression and your READMEs are your way in. I added screenshots, or even came up with quick logos from free online logo sites to add some character to my pages. You don’t have to be the most artistic, but try to add some flair and show off that you are more than the Create-React-App README boilerplate that I see on so many bootcamp projects.</p><h3>Go Beyond What You Are Taught</h3><p>Try to go outside of the curriculum that you are given. We were taught to build REST APIs and so I decided to branch out and learn GraphQL on my own and use it on my final projects. It showed an ability to be a self starter and work independently. If they teach one framework, try to pick up another for the next project. Showing that you can apply new knowledge and skills to the foundation that you are given is crucial. Being able to adapt to new tech and use new tech that you are unfamiliar with shows adaptability and creativity.</p><h3>Use the Docs</h3><p>Although sites like StackOverflow are great, I didn’t feel like I wouldn’t actually get much out of them, other than an answer that was easy to copy and paste from. Once I embraced reading the documentation and going through the details of why things work together, and how the parts are connected, I started to understand my code better and be a better developer. It is not always the easiest way to go about looking for an answer, but it helps build the foundation. Plus there is always that rare “Oh shit!” moment when your answer isn’t on over StackOverflow and all you have are the docs. Those are the moments when you see what you are made of and how much of the tech you really understand. Struggle with the problem for a bit on your own. Use that child-like wonder to solve problems. I have found myself going to StackOverflow less often, and learning more from it.</p><h3>Stay Organized</h3><p>It can be daunting when you have so much to do, to become easily overwhelmed, so it is extra important to stay organized. I had a set schedule including exercise, meals, wife time, and time to work. Also, I had a set aside office to work in, that was just for that purpose. The office was my organized space for work only and helped me stay in that mindset and treat my time learning as a job. Keep it clean and organized. They best purchase I made was a second monitor. More screen real estate will help you be more productive. Learn your keyboard shortcuts and editor inside and out so you don’t get bogged down by inefficient practices. Organize your computer and get everything set up so you don’t have to worry about updates or bad wifi signals. I got rid of most social media links so I wouldn’t be tempted to waste time when I should be working. Treat it like a job, as you are working towards one.</p><h3>Embrace It and Love It</h3><p>A buddy of mine and I started to code around the same time, but once he got into his bootcamp, he decided it wasn’t for him. He didn’t have the passion for coding and it wasn’t something he could see himself doing. That’s ok, it’s not for everyone. If you feel like it’s not for you, find another passion and something that you do love.</p><p>But if you do it, love it. Even the moments of keyboard slamming frustration are followed by joy and relief. When we struggle, we are are learning. I decided that I was going to make this my career and it has woven its way into every corner of my life. Coding podcasts and articles on my commute. Quick CodePen algorithms on break at work. Cracking the coding interview as some light night time reading. I love it, know that this will be my career, and that I will succeed at it. I have embraced it and I love it. Do the same. It will be worth it in the end.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0bb29b9b47b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Dev Bootcamp: My First Month In]]></title>
            <link>https://medium.com/@theran.brigowatz/web-dev-bootcamp-my-first-month-in-39183eb8ba26?source=rss-a62f424ecc92------2</link>
            <guid isPermaLink="false">https://medium.com/p/39183eb8ba26</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[bloc]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[webdev]]></category>
            <category><![CDATA[codingbootcamp]]></category>
            <dc:creator><![CDATA[Theran Brigowatz]]></dc:creator>
            <pubDate>Sat, 14 Apr 2018 08:26:08 GMT</pubDate>
            <atom:updated>2018-04-15T05:37:43.939Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*t790pSL7Lnfr91DE." /><figcaption>“A flatlay with a laptop, a notepad, a smartphone and a mug of coffee” by <a href="https://unsplash.com/@andrewtneel?utm_source=medium&amp;utm_medium=referral">Andrew Neel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>My Newbie Advice for a New Bootcamp Student</h3><p>I know that at this point there are million blog entries dealing with “My First Month Coding” or “Top Ten Things I Wish I Knew When I Started an Online Bootcamp” articles at this point on the web. I am at the point in my early career where I do not profess to be an expert in any capacity. However, I do think that I have a unique perspective to offer, and I want to share those experiences now and going forward. The purpose of this little blog is to document my experiences as I go through Web Develepment Bootcamp with Bloc and to highlight my knowledge as it grows and builds. Below I have outlined a couple of key things that I have learned as I have gone through my first month at Bloc.</p><h3>Have a Support System</h3><p>At this point through my first month I have had two pillars to support me: coffee and a supportive wife. Coffee keeps going through the long hours of the night. My wife has been my rock that supports me in this journey. Whether it is making sure that I eat enough, or sitting across from me now in the Starbucks as I write this, it is always important to have those around you that support your dream. You will have moments that you feel unconfident, but having those around you for support will only serve to lift you up during those trying moments. Having someone whose shoulder I can cry on or show off that cool static webpage to (and give me an honest “Wow”) has been my biggest help in this journey.</p><h3>Embrace Yourself</h3><p>The phrase “Youth is wasted on the Young” is something that I feel is more and more true as I get older. I find myself saying, “If only I had started this years ago” probably at least once a week. Unfortunalely with the linearness of time, I am already on the path that my life has taken, and there is no going back. However, I do still have the opportunity to change my opportunities going forward. Though I may not have the malleable mind of 20 something in college, I do have something more, a drive and purpose.</p><p>As someone in my 30’s I can’t go back in time and make myself into a fresh-faced college student, but I can use my determination and experience to my advantage. Through my years I have built up a solid work-ethic, and I know that my drive will propel me forward. I am always early to work, hit all of my due dates, and have solid references. I can work to highlight those strengths going forward and use my experience as an advantage in the coding world, rather than letting my age hinder my confidence.</p><h3>Put Yourself Out There</h3><p>This one has been a bit difficult for me. I have not been the biggest social media user over the past few years. Other than posting about football and hockey, or throwing up a handful of vacation photos, I have stayed relatively quiet on social media. I am also in the unique situation of living in Asia while looking to move into a career back home in the US. That means that I have to force myself to embrace the social media connections and put myself out there. Whether it be LinkedIn or a blog like this one, force yourself to put yourself out there. Use Slack channels and start following people on Twitter. You never know when those connections may pay off.</p><h3>Go All In</h3><p>Throw yourself into your coding. I have been living, breathing, eating, and even having my first coding dream. On my commute I am scanning a copy of Eloquent JavaScript or listening to a coding podcast. My mornings before work, and evenings after work are working on Bloc curriculum. My weekends are holed up at the coffee shop diving into my assignments and reading articles. Embrace it and love it. I spent almost six months learning on my own in my free time before starting bootcamp to make sure that I really enjoyed it. If it’s something that you love, it isn’t work. Make it into a passion.</p><p>However, along the same lines be sure to take a break. Stand up and clear your mind. Grab a snack or watch some Netflix for a few minutes. Go talk to your partner or roomate for a bit. I have a standing rule that Friday night is date night with my wife. We go out for dinner together to get away from the hustle and bustle of life.</p><h3>Don’t Fear What You Don’t Know</h3><p>This is probably the one that I struggle with the most at this point. I want to know everything now, and I sometimes get frustrated with what I don’t know. I know that imposter syndrome can be very real and it can be a real hinderance. But try to embrace it and let it push you. There will always be somebody out there in the world who is better than you are. Don’t let that hold you back. Let it drive you. Let it be a learning experience and give you focus for what you want to learn next. We all have moments of self-doubt and knowledge gaps. Fill them in and learn from your experiences.</p><h3>Have Fun</h3><p>Life is too short to do something that you don’t like. Embrace the change that you are making and have fun learning a new skill. Work for the career you want and have fun along the journey.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39183eb8ba26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making the Leap: Joining the Tech World]]></title>
            <link>https://medium.com/@theran.brigowatz/making-the-leap-joining-the-tech-world-195294bd445b?source=rss-a62f424ecc92------2</link>
            <guid isPermaLink="false">https://medium.com/p/195294bd445b</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[codingbootcamp]]></category>
            <category><![CDATA[bloc]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Theran Brigowatz]]></dc:creator>
            <pubDate>Sat, 14 Apr 2018 07:14:48 GMT</pubDate>
            <atom:updated>2018-04-14T07:35:08.786Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uQi3M1xCQ5W7ct7upE13hQ.jpeg" /></figure><h4>My Journey from Teacher to Web Dev Student</h4><p>I was 23, bright-eyed, and bushy-tailed. Finishing up at the University of Minnesota. (Go Gophers!) I took a couple hundred dollars, a plane ticket, and a large frame backpack to head off and live in South Korea. Like many expats before me, I jumped into the world of ESL private education and worked my way up through the industry. I have enjoyed teaching, and enjoyed seeing the kids that I work with to grow and develop. Now more than ten years later, I have a smart and beautiful wife, a home, and a career here South Korea.</p><p>Yet something was always missing: creating. When I was young I was a voracious artist. I loved drawing and painting, and to this day my pencil drawing of Howdy Doody is still framed in my Mom’s spare bedroom. Countless Saturdays were spent with a giant box of Legos overturned, and my creations of castles and spaceships filled the rec room floor. I even carried it over into adulthood where my two favorite hobbies are cooking and brewing my own craft beer.</p><p>I love to create. I love to see the inklings of idea form on a page before me. That is what interested me about coding in the first place. I was looking for something that would allow my ideas to come to fruition. And coding has done just that.</p><p>I still remember the first practice page that I made with HTML and CSS when I first was learning through Codeacademy. I tried to make a project for my “home brewery”. I had a logo and color scheme picked out, and I spent hours working on the CSS to create the perfect lines and to position the logo and heading pefectly in my header. Although today I have hidden that project deep down in the bowels of my file system (though a screen shot exists below), it was so rewarding to get my idea into place and have it look just right in the browser. That is, until I resized the browser, looked at the monsrosity before me, and promptly made a beeline to learn Bootstrap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gZWrFGv5kCyyf0wSv87qxQ.png" /><figcaption>That first horrendous header from my first CSS project.</figcaption></figure><p>But it was that creation and learning process that ignited a spark of creativity and passion inside of me. I love the puzzles that need to be solved on a daily basis, and the challenges that are presented to me through coding. I have had moments of confusion because of a missing comma, keyboard pounding moments of frustration because of JavaScript scoping, and the “Eureka!” moments in the shower when I finally figured out how the ‘setattribute’ method would fix all of my problems. All of these times have been a joy in their own unique way throughout these first stages of my journey. It is natural to be frustrated at times, but it is part of the learning process. It has led me down the path of a new and exciting career that I have embraced whole-heartidly.</p><p>I know that I am far from being considered a coder yet. I have a long way to go both technically and in my own mind. I have moments of frustration when I get bogged down by jargon or I have to Google something that I think I should know. But I know that those moments are part of the journey and the learning process. I will get there, and I am willing to put in the work to be a great coder. I know that I have to be patient along the journey, and have faith that my hard work will pay off in the end.</p><p>I have a poster at the front of my classroom for my students here in Korea. It states, “Mistakes are proof that you are trying.” It is advice that I need to make sure that I embrace myself. I know that I have plenty of mistakes on my path to being a developer, but they are the proof that I am trying, as I jump into this world of tech, head-first and ready for the challenges that come.</p><p>Header photo by Ilya Pavlov</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=195294bd445b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>