<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: CalvinJimenez</title>
    <description>The latest articles on Forem by CalvinJimenez (@calvinjimenez).</description>
    <link>https://forem.com/calvinjimenez</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F941709%2Fa039858f-ea84-4c33-9cff-8147314197df.jpg</url>
      <title>Forem: CalvinJimenez</title>
      <link>https://forem.com/calvinjimenez</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/calvinjimenez"/>
    <language>en</language>
    <item>
      <title>Ruby/Rails Console Commands</title>
      <dc:creator>CalvinJimenez</dc:creator>
      <pubDate>Wed, 04 Jan 2023 16:39:32 +0000</pubDate>
      <link>https://forem.com/calvinjimenez/rubyrails-console-commands-311m</link>
      <guid>https://forem.com/calvinjimenez/rubyrails-console-commands-311m</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2p2fqfpypzme62sgrjtf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2p2fqfpypzme62sgrjtf.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One of the fundamentals of Ruby / Ruby on Rails is the console. Now, the naming scheme for both of these is slightly different with the Ruby console being the Rake and the Rails console being Rails. This comes into play when actually using the console itself as well. To use the rake console you need to go to the console and type in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rake console
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the rake console you're able to do a lot of things such as test your code with a pry by just writing bending.pry in a method so that when you hit it by running the method you can test what's in the method. To install pry just write&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gem install pry
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in the console. This is a very useful tool for actually testing any of the code that you have in your method. This is especially useful for when someone doesn't want to have to fully run their application to see if it throws any errors, it's able to single out what an issue is.&lt;/p&gt;

&lt;p&gt;Now, when it comes to Rails it's essentially the same thing as the rake console just with a different name. On that note, the equivalent of pry in rails is called byebug. You install it by putting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gem install byebug
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;in the console. It's pretty much the same as pry where you just throw it somewhere and run the method you're trying to test to hit the byebug. To actually use the rails console you simply type in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rails console
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Along with these methods of testing the console can be used for so much more. In rails specifically you generate most of you files through the console. Say for example you want to make a new model, you would have to put:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rails g resource [Name of model] (any rows in their tables)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This would generate the model along with any of its needed keys or relations to other tables in your backend. There's a plethora of other things that the rails command can do such as seeding and migrating which is done with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rails db:migrate
OR
rails db:seed
OR
rails db:migrate db:seed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see there's different ways to make things more efficient when using the console but that's really something you learn and gain skills to over time.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>rails</category>
      <category>beginners</category>
    </item>
    <item>
      <title>React Components</title>
      <dc:creator>CalvinJimenez</dc:creator>
      <pubDate>Tue, 13 Dec 2022 16:20:09 +0000</pubDate>
      <link>https://forem.com/calvinjimenez/react-components-413k</link>
      <guid>https://forem.com/calvinjimenez/react-components-413k</guid>
      <description>&lt;p&gt;React components are one of the key pillars to learning how to use React. They are reusable code that you can import anywhere you want. It's very similar to how gems work in Ruby, if you're familiar with that. The way you'd go about using a react component is by having a React function with a named function written as such:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import React from "react"

function ReactExample() {
return (
    "Hello"
  )
}

export default ReactExample;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The export default at the end is what allows this component to be used in other components of code. To actually import this block of code into another component you have to do as such:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import ReactExample from "component-path"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Where it says component-path you'd have to write the path in your file you need to take to read the component. Having a feature like this just makes everything easier to write. You could have a certain format of a card that you're using in one section of your work and want to use it somewhere else as well. Instead of copy pasting it you can import a component by writing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;ReactExample/&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This also ties into a previous post that I made about props where you pass props by writing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;ReactExample example={ExampleProps}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To clarify, the props that you pass into the component don't have to be titles props. You can title it whatever you want just as I did with titling the props I passed in "example". This is pretty much the gist of all you need to know about components in React.&lt;/p&gt;

</description>
      <category>bunjs</category>
      <category>gratitude</category>
    </item>
    <item>
      <title>Gems in Ruby</title>
      <dc:creator>CalvinJimenez</dc:creator>
      <pubDate>Mon, 05 Dec 2022 16:20:48 +0000</pubDate>
      <link>https://forem.com/calvinjimenez/gems-in-ruby-1cli</link>
      <guid>https://forem.com/calvinjimenez/gems-in-ruby-1cli</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7iVdQxrL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fq2wu7h7grurbjkv8tzd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7iVdQxrL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fq2wu7h7grurbjkv8tzd.png" alt="Image description" width="462" height="188"&gt;&lt;/a&gt;Gems in Ruby are, in my opinion at least, one of the coolest features about Ruby. Ruby gems generally have a specific purpose such as faking data or something more general like testing/debugging your code. To start you'd have to install bundler by doing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;install bundler
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the way you'd import a gem is by simply running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gem install (your ruby gem)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The final step is to install the gem by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bundle install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A way to find gems is by looking through the official website: &lt;a href="https://rubygems.org/"&gt;https://rubygems.org/&lt;/a&gt;. The coolest part about gems has to be the fact that if you're thinking of doing something tedious or complex to some degree then someone has probably already made it into a gem. A personal favorite gem of mine has to be the faker gem. I alluded to it earlier, it's a gem that fakes data. It can give you different things ranging from fake characters from lord of the rings to fake street names and addresses. The syntax for this gem is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Faker::Name.name

Faker::Address.street_address

Faker::Movies::LordOfTheRings.character
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The text after the colon specifies what kind of information you want and then the dot notation says what you want from that broad range of information. It's pretty expansive and can be used to mainly fake data for a personal project. &lt;/p&gt;

&lt;p&gt;Another super popular gem is the Pry gem. This gem can be used in tandem with another gem known as the rake gem. Simply put, both gems are used for testing out your code and managing it easier. You enter the rake console by running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rake console
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This puts you in a pry session, which is used to run code in specific blocks. There are of course rules you have to follow, but once you get the hang of them it becomes a very powerful tool when you're testing your code. Ruby gems are my favorite aspect of ruby for this exact reason, there's just an endless amount of possibilities whether it be something wacky or something invaluable.&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>webdev</category>
      <category>rails</category>
      <category>beginners</category>
    </item>
    <item>
      <title>React Props</title>
      <dc:creator>CalvinJimenez</dc:creator>
      <pubDate>Mon, 21 Nov 2022 17:16:06 +0000</pubDate>
      <link>https://forem.com/calvinjimenez/react-props-46pc</link>
      <guid>https://forem.com/calvinjimenez/react-props-46pc</guid>
      <description>&lt;p&gt;Now, coming into React I was super excited to see what it had in store for me but that excitement quickly fell apart when I found out about the FIRST topic, props. Props is just short for properties and props in React are used as a way to pass information from an object between React components. An example of how this is done is as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;COMPONENT 1:
function Name() {
const Name = "Calvin"
  return &amp;lt;Introduction name={Name} /&amp;gt;;
}

COMPONENT 2:
function Introduction( {name} )
return &amp;lt;div&amp;gt;Hello, my name is {name}!&amp;lt;/div&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This method is pretty cool because you can pass the props down from component to component, changing it along the way to fit your needs. This is just one method of passing props that requires specific pieces of information to be passed which means it isn't flexible. To do that you'd have to write props as such:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;COMPONENT 1:
function Person() {
const Name = {userInput}
  return &amp;lt;Introduction name={Name} /&amp;gt;;
COMPONENT 2:
function Introduction( {name} ) {
  return &amp;lt;div&amp;gt;Hello, my name is {name}!&amp;lt;/div&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, you'd have to make the prop a variable of some sort and find way to have it show user input with something such as a search bar. Now, the name that you give the prop after you refer to the component you want to pass it to doesn't matter, all that matters is that in the curly brackets you have the name of the data that you want to pass to it.&lt;/p&gt;

&lt;p&gt;One thing that actually took me a long time to understand for some reason is that props DON'T have to have the word props, they can be whatever word you want. You just have to refer to them as that set name. I'm not sure why it took me so long to figure this out but no amount of Googling helped me figure that out until I saw one example that didn't have the word props and used a relevant word instead. I specifically hope that this cleared up any confusions with the naming of props.&lt;/p&gt;

</description>
      <category>react</category>
      <category>props</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Why I'm at Flatiron</title>
      <dc:creator>CalvinJimenez</dc:creator>
      <pubDate>Mon, 14 Nov 2022 14:42:08 +0000</pubDate>
      <link>https://forem.com/calvinjimenez/why-im-at-flatiron-4f95</link>
      <guid>https://forem.com/calvinjimenez/why-im-at-flatiron-4f95</guid>
      <description>&lt;p&gt;I only have one prior blog post and looking back to it, it's crazy how much I've learned in the past month. Thinking about it, it's also crazy how much has really happened in my personal life. Prior to Flatiron I was in &lt;a href="https://www.ccny.cuny.edu/"&gt;The City College of New York&lt;/a&gt; as an intended computer science major just trying to work through it. One thing you would know if you click the link is that my school is a STEM school. All this really means is that it's heavy on the sciences and math. As an extent of this, they push REALLY heavily on math, something that I'm TERRIBLE at. As a result of this I failed math two semesters in a row. I didn't want to risk failing out of the school so I decided to take the next semester off and luckily as I decided this I overheard my stepdads nephew say something I had heard before. He said that he got his job in tech through a bootcamp. Up until this point I've only heard of bootcamps from Youtube ads and always thought they were scams or just not worth it and that I needed my degree to really get anywhere in life. Once I heard about this the only thing that was scaring me of at that point was the cost so I tried teaching myself how to code (clearly it didn't go well) but after a couple months I bit the bullet and signed up for APP ACADEMY. What a twist I know. Come to find out, after preparing for all that time I didn't pass the test required to get in. I was sad but little did I know it was probably a blessing in disguise. My second choice was Flatiron and after actually getting into Flatiron I was extremely nervous because I just didn't know how it was going to go. Fast forwarding a little bit I knew I was in the right arms. I lucked out and got the best set of instructors and coach anyone could've asked for. No but seriously they are the greatest couple of people anyone could've asked for and after the first week I knew that it was going to be a good couple of months. I have no regrets and I'm more than happy to be where I am. Sadly meanwhile my personal life has been rocky and there's been some things but through it all I just think of graphs like this &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ski2M7Ba--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mkt2pa6lcec0t83ptbou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ski2M7Ba--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mkt2pa6lcec0t83ptbou.png" alt="Image description" width="880" height="613"&gt;&lt;/a&gt;&lt;br&gt;
and how nothing is that linear. All in all, I'm happy and grateful that I'm having such an incredible experience at Flatiron. In spite of that, obviously, your mileage may vary. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>2nd Day at Flatiron School</title>
      <dc:creator>CalvinJimenez</dc:creator>
      <pubDate>Thu, 13 Oct 2022 01:40:48 +0000</pubDate>
      <link>https://forem.com/calvinjimenez/2nd-day-at-flatiron-school-433f</link>
      <guid>https://forem.com/calvinjimenez/2nd-day-at-flatiron-school-433f</guid>
      <description>&lt;p&gt;I missed the first day but it's better to start now than never. Well, today we went over manipulating the DOM and different things that we can do with the DOM. I've gotta say, I understood why the instructor was doing what he was doing but not how he was doing it. I felt overwhelmed in a way but it's okay. I plan on studying the topics from yesterday and today on the weekend and just getting on pace with where we're supposed to be for now. I just plan on aligning everything up eventually. It's gonna be hard but it'll all be worth it in the end. Right now I'm working ahead and learning about events and I've gotta say, I understand it pretty well. I see a bright future ahead and I'm gonna work hard to keep that future bright.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
      <category>flatiron</category>
    </item>
  </channel>
</rss>
