<?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 Kaeland Chatman on Medium]]></title>
        <description><![CDATA[Stories by Kaeland Chatman on Medium]]></description>
        <link>https://medium.com/@kaeland1?source=rss-eff2bcd0bd48------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*3d_OVrfyCEgpxocd.</url>
            <title>Stories by Kaeland Chatman on Medium</title>
            <link>https://medium.com/@kaeland1?source=rss-eff2bcd0bd48------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 08:11:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kaeland1/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Short Synopsis of Higher Order Components]]></title>
            <link>https://medium.com/@kaeland1/a-short-synopsis-of-higher-order-components-94b3b49b7fc7?source=rss-eff2bcd0bd48------2</link>
            <guid isPermaLink="false">https://medium.com/p/94b3b49b7fc7</guid>
            <category><![CDATA[higher-order-function]]></category>
            <category><![CDATA[higher-order-components]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Kaeland Chatman]]></dc:creator>
            <pubDate>Mon, 11 Feb 2019 11:10:12 GMT</pubDate>
            <atom:updated>2019-02-11T11:10:12.859Z</atom:updated>
            <content:encoded><![CDATA[<p>Yo, so there are these things called Higher Order Components, or HOC’s for short.Higher order components are a React Pattern for providing reusable logic/state to other components. In brief, higher order components are functions that return components. Before we cover higher order components, let’s do a brief review of a similar feature found in Vanilla JS, higher order functions. Higher order functions are functions that return functions. Let’s do an example.</p><pre>function multiply(<em>x</em>, <em>y</em>) {</pre><pre>return x * y</pre><pre>}</pre><p>Here we have a regular javascript function that multiplies two numbers. Simple enough right? Let’s consider the fact that if we’d like to multiply other numbers we’d need to call ```multiply``` several times for each of those operations. However, let’s consider a way to abstract this functionality of multiplying two numbers.</p><pre>function createMultiplier(<em>x</em>, <em>callback</em>) {</pre><pre>return function (<em>y</em>) {</pre><pre>return callback(x, y)</pre><pre>}</pre><pre>}</pre><p>Behold, our first higher order function! It is a function that takes in a function as an argument and then returns a function with enhanced logic.</p><p>With our higher order function we can now create other functions that multiply two numbers of our specific intent.</p><pre>const multiplyByTwo = createMultiplier(2, multiply)</pre><pre>const multiplyByFive = createMultiplier(5, multiply)</pre><pre>const multiplyByTen = createMultiplier(10, multiply)</pre><pre>// Calling our functions: </pre><pre>multiplyByTwo(4) <em>// 8</em></pre><pre>multiplyByFive(5) <em>// 25</em></pre><pre>multiplyByTen(8) <em>// 80</em></pre><p>With React, we can perform the same kind of functional encapsulation using Higher Order Components. Essentially, we will be creating functions that will return react components with extended logic. How cool is that?! Let’s take for example, the idea that we could extend the default “theme” of a particular piece of our application, maybe a button for example. How could we accomplish this? Well, we could first begin by using our knowledge of the fact that some components are actually just functions. Knowing this, we could script a function that returns a class component and pass any piece of logic as a prop to that component. In our case, this prop would be an additional “theme” or “setting” to extend an original component.</p><pre>function withTheme(<em>Component</em>, <em>theme</em>) {</pre><pre>return class WithTheme extends React.Component {</pre><pre>render() {</pre><pre>return &lt;Component <em>theme</em>={theme} /&gt;</pre><pre>}</pre><pre>}</pre><pre>}</pre><p>Being that we wish to extend the functionality of a button within our application, let’s build a stateless functional component that returns a button. Notice our button receives props, and uses the “theme” prop to change the color of the button’s text.</p><pre>const Button = function(<em>props</em>) {</pre><pre>return &lt;button <em>style</em>={{ color: props.theme }}&gt;Press Me Baby!&lt;/button&gt;</pre><pre>}</pre><p>Now that we have our High Order Component (HOC) that extends the theme of any particular part of our application via props, let’s generate new buttons using our “withTheme” component generator.</p><pre>const ButtonWithGreenTheme = withTheme(Button, ‘green’)</pre><pre>const ButtonWithBlueTheme = withTheme(Button, ‘blue’)</pre><pre>const ButtonWithRedTheme = withTheme(Button, ‘red’)</pre><p>Sweet! And that’s it. You’ve now created an extensible piece of UI that can alter pieces of your application at will. Image other instances where this could be quite helpful. Maybe you’d like to extend the theme of your app from “light mode” to “dark mode” or maybe you’d like to extend some functionality of a table, menu, or chart. Whatever the case, the possibilities are endless.</p><p>If you’d like to learn more about HOC’s or high order components, please give Tyler McGinnis’ <a href="https://tylermcginnis.com/react-higher-order-components/">blog article</a> a read. It’s solid, and it provides great examples on the topic. That’s all for now, thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94b3b49b7fc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Creating a Line Chart with React-Vis]]></title>
            <link>https://medium.com/@kaeland1/creating-a-line-chart-with-react-vis-8b298af04258?source=rss-eff2bcd0bd48------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b298af04258</guid>
            <category><![CDATA[d3js]]></category>
            <category><![CDATA[react-vis]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[charts]]></category>
            <dc:creator><![CDATA[Kaeland Chatman]]></dc:creator>
            <pubDate>Mon, 11 Feb 2019 11:09:01 GMT</pubDate>
            <atom:updated>2019-02-11T11:09:01.326Z</atom:updated>
            <content:encoded><![CDATA[<p>React-Vis is an incredibly configurable charting library open sourced from the folks at Uber. It’s main premise is that it provides D3 functionality while still using React component and props. This is great given the fact that React is a widely popular view framework used by many frontend developers. D3, on its own however, has a bit of learning curve. Let’s see how quickly we can spin up a line chart with React-Vis. Ok, let’s start.</p><p>Much like in middle school algebra, React-Vis line charts are composed of a familiar set of components, namely: horizontal and vertical grid lines, an x-axis, a y-axis, and the actual line to be drawn on the chart. To compose a line chart, we’ll first need to import the wrapper component for our chart from the react-vis library in addition to the css styling. This component looks like the following:</p><pre>import ‘../node_modules/react-vis/dist/style.css’; <em>// css styling from the react-vis node module</em></pre><pre>&lt;XYPlot <em>height</em>={400} <em>width</em>={400} /&gt;</pre><p>Please note, this component must be passed both height and width props. Having imported our wrapper component, we can now import the gridlines, as well as our x &amp; y axes. They look like this:</p><pre>&lt;VerticalGridLines /&gt;</pre><pre>&lt;HorizontalGridLines /&gt;</pre><pre>&lt;XAxis /&gt;</pre><pre>&lt;YAxis /&gt;</pre><p>Simple enough right? Now let’s create our chart with it’s corresponding grid:</p><pre>&lt;XYPlot <em>height</em>={400} <em>width</em>={400}&gt;</pre><pre>&lt;VerticalGridLines /&gt;</pre><pre>&lt;HorizontalGridLines /&gt;</pre><pre>&lt;/XYPlot&gt;</pre><p>Ok sweet! Now, in order to display a line on this chart, we’ll need to import our final component, called a LineSeries.</p><pre>&lt;LineSeries /&gt;</pre><p>This component will take a single property called data, which will be passed an array of objects with x &amp; y properties.</p><pre>const data = [{x: 0, y: 8},</pre><pre>{x: 1, y: 5},</pre><pre>{x: 2, y: 4}]</pre><pre>&lt;LineSeries <em>data</em>={data} /&gt;</pre><p>With this, we can now finalize our React-Vis line chart by adding in our &lt;LineSeries&gt; component like so:</p><pre>const data = [{x: 0, y: 8},</pre><pre>{x: 1, y: 5},</pre><pre>{x: 2, y: 4}]</pre><pre>&lt;XYPlot <em>height</em>={400} <em>width</em>={400}&gt;</pre><pre>&lt;VerticalGridLines /&gt;</pre><pre>&lt;HorizontalGridLines /&gt;</pre><pre>&lt;XAxis /&gt;</pre><pre>&lt;YAxis /&gt;</pre><pre>&lt;LineSeries <em>data</em>={data} /&gt;</pre><pre>&lt;/XYPlot&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*0DqCoAv3EU4_2hmJjmoq-w.png" /></figure><p>Add there you have it! Our first React-Vis Line Chart… with data! Imagine the possibility of pulling your data from your own backend, or maybe using WebSockets to feed data to a chart in real-time. Pretty neat right? If this interests you, please give the React-Vis <a href="https://uber.github.io/react-vis/">documentation</a> a glance. There are many other charts available, and each chart is highly configurable based on your respective use case. Anyways, that’s all for now. Thanks for reading, peace!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b298af04258" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Incredibly Gentle Introduction to D3.js]]></title>
            <link>https://medium.com/@kaeland1/an-incredibly-gentle-introduction-to-d3-js-7e848f84223b?source=rss-eff2bcd0bd48------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e848f84223b</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[development]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[d3]]></category>
            <dc:creator><![CDATA[Kaeland Chatman]]></dc:creator>
            <pubDate>Thu, 20 Dec 2018 20:05:41 GMT</pubDate>
            <atom:updated>2018-12-20T20:05:41.173Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*V9ZL3_ygnTmcHP_K" /><figcaption>Photo by <a href="https://unsplash.com/@goumbik?utm_source=medium&amp;utm_medium=referral">Lukas Blazek</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><a href="https://d3js.org/"><em>D3</em></a><em> is a Javascript library for handling DOM elements based on data. Using D3, we can use common web standards, such as HTML, CSS, and SVG to construct interactive data visualizations with (moderate) simplicity. In this brief example, I’ll create a very simple bar chart. Let’s begin.</em></p><p><em>Using the D3 library, we can map data points to an SVG tag element, &lt;svg&gt;. SVG stands for, </em><a href="https://developer.mozilla.org/en-US/docs/Web/SVG"><em>Scalable Vector Graphics</em></a><em>, and it is an XML-based vector image format for two-dimensional graphics that supports animation and interactivity. Unlike the normal tags we use in a typical HTML file (div, p, etc.), SVG tags take their own kind of attributes. First we’ll create a set of data points.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VltzZ0bXV55br0qMHQpX7Q.png" /></figure><p><em>Now let’s define the space (in pixels) in which we’d like our chart to exist. These variables will be mapped to the &lt;svg&gt; tag’s “width” and “height” attributes as well as a &lt;rect&gt; tag’s “width” attribute later in the example.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UeROeg-R93fCs4GR8x6uNA.png" /></figure><p><em>Let’s define a variable for an individual bar’s width. The logic behind this variable is that no matter the amount of data points in our dataset, each individual bar will have the same size as the other bars in our chart.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m6s8EQGqjbL7F3mprZoSvw.png" /></figure><p><em>Much like the DOM selection methods we’re used to seeing in development (document.querySelector, document.getElementById), D3, also has a set of selection methods for selecting DOM elements within our browser window. Here we’ll use the “select” method to select the HTML body tag and append an &lt;svg&gt; child element within the body. Here we’ll also set the &lt;svg&gt; tag’s attributes we defined above.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uHI706bIK0vMBivG6Zu1tA.png" /></figure><p><em>Ok, sweet! Now, let’s create our bar chart! Using D3, we’re able to map each of our specific data points to an individual SVG related tag. Because the bars in our chart are very much like SVG rectangles, we will map our data to an SVG &lt;rect&gt; tag and display those bars within our &lt;svg&gt; tag.</em></p><p><em>In order to do this, D3 allows us to reference DOM elements that may not yet exist, and in our case, this would be all the &lt;rect&gt; tags we’d like to create. Using the “data” method we can connect our dataset to each &lt;rect&gt; tag reference. Then we’ll use the “enter” method to operate on each individual &lt;rect&gt; tag. At this point, we’re able to set the attributes of our &lt;rect&gt; tags. These attributes will control the positioning of the rectangles (bars) within the &lt;svg&gt;. The “y” attribute, determines the vertical positioning of a bar from the top of the &lt;svg&gt;, since the &lt;svg&gt;’s vertical axis is defined from the top down. The height attribute, determines how tall each bar will be. The “width” attribute, determines how wide each bar will be. Thankfully, we’ve defined variables above to help us size each bar properly. Our last property definition will be the “transform” property. This property exists to determine the horizontal positioning of each bar within the SVG, so that the bars will not be stacked on top of one another.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_Iest-2daymW-pMyht7gw.png" /></figure><p><em>Having set these attributes, our bar chart can now be displayed within our browser.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TusjjAcQD_LisP2oNVDLpw.png" /></figure><p><em>I know, it’s not very complex, but it’s still a bar chart!</em></p><p><em>I’d like to thank Sohaib Nehal, in conjunction with FreeCodeCamp, as the source for this great tutorial. Sohaib’s original tutorial covering the basics of D3 can be found </em><a href="https://www.youtube.com/watch?v=C4t6qfHZ6Tw"><em>here</em></a><a href="http://www.youtube.com/watch?v=C4t6qfHZ6Tw."><em>.</em></a><em> Please check it out if you have a chance.</em></p><p>Thanks for reading. Peace!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e848f84223b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Journaling as a Bootcamp Student]]></title>
            <link>https://medium.com/@kaeland1/journaling-as-a-bootcamp-student-4907b6ebaa22?source=rss-eff2bcd0bd48------2</link>
            <guid isPermaLink="false">https://medium.com/p/4907b6ebaa22</guid>
            <category><![CDATA[emotional-health]]></category>
            <category><![CDATA[writing]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[journaling]]></category>
            <dc:creator><![CDATA[Kaeland Chatman]]></dc:creator>
            <pubDate>Thu, 08 Nov 2018 14:47:53 GMT</pubDate>
            <atom:updated>2018-11-08T14:47:53.763Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KXFhbg-W9hXPu-v_" /><figcaption>“pen on white lined paper selective focus photography” by <a href="https://unsplash.com/@aaronburden?utm_source=medium&amp;utm_medium=referral">Aaron Burden</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Wow, here it is. My first blog post as a budding software engineer. It’s week 2 of my journey as a student in a very thorough software engineering bootcamp, and I’m feeling a ton of emotions right now. I’m both excited and nervous, curious but cautious, and generally thankful all at the same time. Having thought through the topic of this first blog, I’ve decided to make this post about what I’m currently doing to process everything I’m experiencing. I hope that after some editing, and much needed coffee, this post can be somewhat of a resource for other “bootcampers” out there.</p><p>So, there’s this thing called Journaling. Oooo, didn’t see that coming did you? Well, for me this concept of chronicling one’s life, expectations, sorrows, frustrations, and joys all in one go is slightly foreign. Like why would I even need this? I could just binge a season of “This is Us” if I needed to see that range of human emotions, let alone my own right? Maybe it has something to do with me being a guy. From my own experience and observations, guys can be notoriously hard at verifying what we’re experiencing on the inside. For instance, on any given day, at any given time, you could ask me something like, “Hey, how are you feeling today?” My response would likely be some variation of, “I don’t know, I guess I’m kind of hungry… I could use a snack right now.” I’m not even joking, ask any guy near you, and there’s a 50/50 shot he’s probably thinking about food has thought about food within the last 5 minutes. Try it, I’ll wait… See, what I’m talking about. It’s so difficult for me to even know who I am, with all this food on my mind. And so, returning to the original question as to why would it even be necessary to identify your emotions as a human, I’d simply respond, self awareness. Taking on the endeavor of completing a bootcamp, where no day is the same, without constantly identifying your own sense of self, might actually be a little hazardous, no matter who you are.</p><p>That being said, I’d like to provide somewhat of a tool (or framework if you will) for generating quality journal entries. Please note that #1, I’m coming up with this completely on the spot at the moment, and #2, this is not something concrete. So here we go, let’s call it the, <strong>Three V’s of Processing and Identifying Emotional Wellbeing While Journaling</strong> method, or “<strong>Vvv</strong>” for short. I know, the name needs a little work, but we’ll get there in time.</p><p>The first “V” of this method, would be <strong>Vivid</strong>, or simply describing, as best possible, all that your going through during your journal entry. The level of detail is entirely dependent upon you, but I’d really encourage walking through your daily experience as a new dev who’s learning so many new things within such a short window.</p><p>The second “V” would be <strong>Vulnerability</strong>. I know, the very concept of writing within a journal makes you vulnerable, but what I’m attempting to convey here is that you want your journal entries to be fully you, no filter. Like the very idea of someone getting a hold of your beloved journal should make you blush. The reason behind this would be that, it’s very likely that you as a student have taken a temporary hiatus from those relationships with which you would normally be open to discussing your feelings. Depending on the level of intensity of your bootcamp, ties with close family and friends may be just shy of cut off, and that can be an incredibly difficult pill to swallow as you’re already trying to digest a ton of new information. So, do yourself a favor and lay it all there. “Say it with ya chest,” so to speak.</p><p>The third “V” of this method would be <strong>Veritas</strong>, a latin term meaning truth. Your journal entries should be honest. During the past two entries of my own journal, I’ve noticed that I still have the opportunity of being dishonest with myself, even in a space as safe as my personal writings. Avoid this. Be as true to yourself as you can, and state the obvious as often as you can. The more this is practiced, the easier it’ll become… just like programming… sort of.</p><p>Finally, remember that journaling can honestly be whatever you want it to be. Use it to help you gauge where you are along your journey as a bootcamp developer, and it may provide you with a useful tool to help tell your story to others during your bootcamp, and maybe much further along the way as well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4907b6ebaa22" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>