<?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 Brianna Dixon on Medium]]></title>
        <description><![CDATA[Stories by Brianna Dixon on Medium]]></description>
        <link>https://medium.com/@brianna.dixon023?source=rss-b1b665b381e2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*JZRJMUung1c9tn2-hSnKVg.jpeg</url>
            <title>Stories by Brianna Dixon on Medium</title>
            <link>https://medium.com/@brianna.dixon023?source=rss-b1b665b381e2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 07:07:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@brianna.dixon023/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[React: State vs. Props]]></title>
            <link>https://medium.com/@brianna.dixon023/react-state-vs-props-9b1c27b66250?source=rss-b1b665b381e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b1c27b66250</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[props]]></category>
            <category><![CDATA[state]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Brianna Dixon]]></dc:creator>
            <pubDate>Thu, 04 Apr 2019 13:51:52 GMT</pubDate>
            <atom:updated>2019-04-18T15:47:28.510Z</atom:updated>
            <content:encoded><![CDATA[<p>Today’s date is April 4th, 2019. I have no idea where the past three months have gone and I cannot believe that I’m already halfway through the first week of Mod 4 at Flatiron. Every single day I’m learning and realizing so many new things. Sometimes I feel like Scarlett Johansson in <em>Lucy, </em>other times, I’m pretty certain that all activity in my brain has ceased.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2Fl0HlEEwgZfgqfH70c%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2Fl0HlEEwgZfgqfH70c%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2Fl0HlEEwgZfgqfH70c%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="435" frameborder="0" scrolling="no"><a href="https://medium.com/media/b2770521fb806ab1452b04ea761bc670/href">https://medium.com/media/b2770521fb806ab1452b04ea761bc670/href</a></iframe><p>Following three weeks of JavaScript, Mod 4 is all about React. First, I must say- I love JavaScript and I plan to work towards mastering the language when I have a little bit more free time. That being said, I also am really enjoying the React.JS library so far. It feels like it was the way I wished I could go about thinking about, organizing and manipulating the DOM during our vanilla JavaScript days.</p><p>Two of the most important data structures in React are state and props. Since React is all about the components and the components are all about their data, we’ve been dealing a lot with state and props and I wanted to look into them a little bit further. Both state and props are plain JS objects that hold data, trigger render updates, and are deterministic, but what are their differences? What does each do and when should I use it?</p><h3>State</h3><p>The state of a component is where the data is held that determines how that component behaves and is rendered. State is mutable, but a component is mainly responsible for changing its state. State values can be inherited from parent components, but a change in a child components state would not be reflected in the parent. So when do we use state? Because state “increases complexity and reduces predictability,” it is preferable to limit the use of state on components, and we should only use it when a component will need to alter one of its attributes.</p><h3>Props</h3><p>Data flow in React is comparable to a river flowing downstream, or genealogy within a family tree; the data trickles downwards from the top components into the components that rely on them, or child components inherit data from their parent components. Props are the vessels we use to pass this data, they are the DNA. Props are both inherited from the parent components to the child and also are used to pass data from that child into a subsequent child. Props are immutable, “read-only” data. Once that object is instantiated, its properties cannot be changed.</p><p>Hold on, so state is managed within a component, and props can only be passed downwards to a child component.. Is there no way to reflect changes to a child component in any of its ancestors? Wouldn’t we want to communicate changes to other related elements to keep them in sync? Well, there is! We can use ~callback functions~!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fgiphy.com%2Fembed%2FM7GJcBlyXB6g0%2Ftwitter%2Fiframe&amp;url=https%3A%2F%2Fmedia.giphy.com%2Fmedia%2FM7GJcBlyXB6g0%2Fgiphy.gif&amp;image=https%3A%2F%2Fi.giphy.com%2Fmedia%2FM7GJcBlyXB6g0%2Fgiphy.gif&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=giphy" width="435" height="195" frameborder="0" scrolling="no"><a href="https://medium.com/media/6a0e28d533f90f100aa15a05fd8f14a8/href">https://medium.com/media/6a0e28d533f90f100aa15a05fd8f14a8/href</a></iframe><p>Unfortunately, I am out of time for today, so check out my soon-to-come follow up blog on callback functions and lifting state!</p><p>Sources:</p><p><a href="https://github.com/uberVU/react-guide/blob/master/props-vs-state.md">react-guide/props-vs-state.md at master · uberVU/react-guide</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b1c27b66250" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[:References in Rails]]></title>
            <link>https://medium.com/@brianna.dixon023/references-in-rails-bc5ac3ccbd9d?source=rss-b1b665b381e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/bc5ac3ccbd9d</guid>
            <category><![CDATA[association]]></category>
            <category><![CDATA[reference]]></category>
            <category><![CDATA[generator]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <dc:creator><![CDATA[Brianna Dixon]]></dc:creator>
            <pubDate>Thu, 07 Mar 2019 17:31:40 GMT</pubDate>
            <atom:updated>2019-03-07T18:19:41.425Z</atom:updated>
            <content:encoded><![CDATA[<p>Setting up associations just got a tiny bit easier…</p><p>As I approach the end of my sixth week at the Flatiron School, it’s been incredible to reflect upon how much we’ve learned so far. Though every day I still use real-world applications and wonder, “how will I ever be able to make something this cool and functional??”, I have to remind myself that only six weeks ago, I didn’t even know what object-oriented programming was, and I certainly didn’t have any of the skills I do now. In the first three weeks, we focused mostly on Ruby, SQL, and ActiveRecord. Getting in those fundamental skills before abstracting so much of it to learn the power of Ruby on Rails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fbq6DoaLqKg9JHKa" /><figcaption>Photo by <a href="https://unsplash.com/@tobey_j?utm_source=medium&amp;utm_medium=referral">Tobias Jelskov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Module 2 began with us learning more about how the internet works, dabbling a bit with Sinatra, and then finally unleashing the power of Rails. Rails is an MVC framework that makes building and connecting a database, web service, and web pages seem like magic. There are so many macros, conventions, and patterns built-in, that using only several simple commands can build out the entire skeleton of a web-application for you, and it may be easy to simply follow its conventions and create something while having no idea what’s actually going on underneath. Luckily, here at Flatiron we have incredible faculty who want us to have an in-depth understanding and appreciation for what is actually going on behind the scenes, and we often approach each new subject by learning all of its intricacies and then later abstracting it all away.</p><p>In a review lesson for our code challenge the other day, we were practicing building applications using Rails, and as we were building out our models through the terminal for a one-to-many relationship, our lecturer used “references” instead of explicitly setting up the foreign key column on the belongs-to table. It looked something like the first example below, in contrast to what we had previously been doing, which would look more like the second example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o-8NbxAkTK6aqBfZIFHj4g.png" /><figcaption>Ex. 1: associating the cat model as belonging-to the human model</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*epDyxYbhsQRudcvQLtr2tA.png" /><figcaption>Ex. 2: setting up the foreign ID column on the cats table</figcaption></figure><p>Briefly it was explained to us, that using references establishes a “belongs to” relationship between the model being generated and the model being “referenced.” But, in typical Flatiron way, we were told “do not use this if you do not understand all that it does,” so I tucked that information away and carried on explicitly setting up my foreign ID column in my model generations, and establishing associations within the model inside of the application.</p><p>Fast-forward to project week where we are working in pairs to build entire websites using Rails. My partner wanted to use references while setting up our models and it got me thinking about this what exactly this does for you and how much is going on behind the scenes when you use it. The short answer: really not too much, it just saves an extra step or two and safeguards some things.</p><p>First, references recognizes the relationship you are establishing between the two models- the model you are generating “belongs to” to the model that “:references” is being called on. In turn, Rails writes the association within the model for you, and adds the foreign key column INCLUDING an index. So if you were to generate the model through the terminal as seen in the first example from above, our Cat model would have “belongs_to :owner,” and in the schema, inside the “cats” table, you would see two lines for the owners foreign key, looking something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3VC7giPun28FS5jY3vNLGg.png" /></figure><p>The only part of this that I was unfamiliar with was the indexing on the foreign key. After doing a little bit more research, I discovered that indexing is apparently quite important for a database, and if you index properly, it will help improve the speed of operations on a table, and in fact, “not indexing foreign keys can cripple your app.” For more in depth examples and explanations, <a href="http://archive.is/i7SLO">this blog</a> by Tom Ward is an informative and quick read.</p><p>From now on, when building on Rails, I will continue using references to generate models when applicable. It doesn’t do anything too crazy, or anything that I don’t understand or that I’m not capable of, it just helps properly index, therefore improving the performance of my entire app. How great is Rails and all of the “magical” tools it provides us with? Thanks again to the Ruby community!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yG9rrW0oITwcQqA7" /><figcaption>Photo by <a href="https://unsplash.com/@cmhedger?utm_source=medium&amp;utm_medium=referral">Courtney Hedger</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bc5ac3ccbd9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Happy Valen.times do]]></title>
            <link>https://medium.com/@brianna.dixon023/happy-valen-times-do-4d76a3cc179c?source=rss-b1b665b381e2------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d76a3cc179c</guid>
            <category><![CDATA[love]]></category>
            <category><![CDATA[flatiron-school]]></category>
            <category><![CDATA[ruby]]></category>
            <dc:creator><![CDATA[Brianna Dixon]]></dc:creator>
            <pubDate>Thu, 14 Feb 2019 17:20:53 GMT</pubDate>
            <atom:updated>2019-02-14T17:20:53.203Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>LearnLoveCode</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*RWSvT_cm22Pzkn6q" /><figcaption>Photo by <a href="https://unsplash.com/@rawpixel?utm_source=medium&amp;utm_medium=referral">rawpixel</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><em>“Hello World!”</em></p><p>Welcome to my very first blog post… ever. In times to come, you can expect some more helpful, informative, interesting posts from me about cool things like macros or algorithms or maybe artificial intelligence or quantum computing, etc. For today though, I’d like to take this silly holiday as an opportunity to sing some praise to love, and to a beautiful community that I’ve only just recently been fortunate enough to become a part of.</p><p>About three weeks ago, after a couple months of bootcamp and pre-work, I officially began my journey as a student at the Flatiron School on the web development track. In this short amount of time, my life has truly already begun to change in the most exciting ways. Every day here, I’m learning something new and being challenged and pushed to my limits, while also being surrounded by some of the most incredible humans I’ve ever met. It’s almost unbelievable how amazing this experience has been so far.</p><p>I was first introduced to Ruby only about a month and a half ago, in the pre-work section of the course. Immediately, I was intrigued. Not only in the language itself, but also in the community that evolved from it. Ruby’s creator Matz, (Yukihiro Matsumoto) designed Ruby to gift other programmers with a beautiful, simple, efficient and workable language. In essence, his goal was to make programmers happy. From this gift spawned generations of Ruby programmers who actively choose to uphold the principles of respect, kindness, and positivity. The Ruby community is one of love- love for each other and love for programming. This ultimately allows creativity and productivity to flourish and makes space for the community to thrive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7-rbU0VECmigVDC-l7_eqQ.jpeg" /><figcaption>Yukihiro “Matz” Matsumoto . (Mathias Meyer — <a href="https://www.flickr.com/photos/ipom/5862768190/">https://www.flickr.com/photos/ipom/5862768190/</a>)</figcaption></figure><p>“<em>Make Ruby natural, not simple, in a way that mirrors life” -Yukihiro Matsumoto</em></p><p>Since then I truly have fallen in love with Ruby. We’ve had our ups and downs, don’t get me wrong. Some days while trying to learn and understand Ruby I’ll want to scream and throw my computer across the room. I’ve even cried over Ruby before… seriously. Despite all of that, I just can’t get it out of my head- it’s become integrated with the way I think. I look at my cats and think of how these little instances of the Cat class are so great (or terrible, depending on the method they’re implementing at the time), I think about what I want to do in conditionals, I dream about code throughout the night and it excites me to wake up and go absorb and play with Ruby. Through all the pain and frustration, I still find myself head over heels for Ruby. In the remainder of my time at the Flatiron School, we will be covering a million concepts and languages after Ruby, and though I am eager to take in as much as I can, I will be ever-grateful for my foundation with this delightful language and the rollercoaster ride that I’ve gone through while learning it.</p><p>Fortunately, the “Flatiron way” is also love. I’m lucky enough to be at a school that encourages a community built on respect, collaboration, and positivity. In less than three weeks, my cohort has become like a family to me. We struggle together and we create together, we laugh together and sometimes we also cry together. We face this grueling program together, helping each other out and supporting each other whenever we can. We cheer each other on and try to help anyone up should they fall. We embody Ruby’s principles and the Flatiron Way, and I believe there’s a direct link between that and our success now and in the future. With love, we can get so much further and push ourselves so much harder than we can alone.</p><p>Love is what makes the world go ‘round. Love is what builds strong, lasting bonds and communities. When I say love I don’t mean romance or mushy gifts or most peoples’ idea of what “love” is. The love I’m referring to means passion, commitment, a desire to understand, acceptance, appreciation and kindness. Every day I try to love what I’m doing and for me, it makes all the difference. The principles that this love encompasses are keys to success, growth, creation and evolution. Try loving what you do and those around them, see how it makes you feel, see if it changes your scope.</p><p>Happy Valentines Day!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P7HQd3DwKUCNbMtL" /><figcaption>Photo by <a href="https://unsplash.com/@timmarshall?utm_source=medium&amp;utm_medium=referral">Tim Marshall</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d76a3cc179c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>