<?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>DEV Community: Amira de Moya</title>
    <description>The latest articles on DEV Community by Amira de Moya (@amira_demoya_2fbe3d1fa55).</description>
    <link>https://dev.to/amira_demoya_2fbe3d1fa55</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%2F890313%2Ffab93c3e-bc2a-4069-b9c8-5eecb3640b1a.png</url>
      <title>DEV Community: Amira de Moya</title>
      <link>https://dev.to/amira_demoya_2fbe3d1fa55</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/amira_demoya_2fbe3d1fa55"/>
    <language>en</language>
    <item>
      <title>Second Time Around -Flatiron Ruby Code Challenge</title>
      <dc:creator>Amira de Moya</dc:creator>
      <pubDate>Thu, 05 Jan 2023 14:52:11 +0000</pubDate>
      <link>https://dev.to/amira_demoya_2fbe3d1fa55/second-time-around-flatiron-ruby-code-challenge-4lm1</link>
      <guid>https://dev.to/amira_demoya_2fbe3d1fa55/second-time-around-flatiron-ruby-code-challenge-4lm1</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;     "The second time around
      I know you come a long way, Baby
      But you don’t need that heart of stone, no
      You proved that you could do it, do it, Baby,
      You could make it on your own” -Shalalmar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt; &lt;br&gt;
 &lt;br&gt;
“You can make it on your own”……not quite . Cold challenge week is always the most stressful week at Flatiron School.  However, my issues started in week two, Phase 3 Thanksgiving week, …somewhere in Jamaica.   We had daily power outages which of course affected the internet, and this just hindered me tremendously.   I was way behind on everything, lectures, classwork and BLOGS of course.   I knew it would be nearly impossible to pass the code challenge the following week.   These outages and connectivity issues continued into code challenge week, and I could not focus on anything.   The back end looked so daunting.  I was inside pry thinking how much I couldn’t even understand what I was reading and how much I missed React, the lights, the colors, the action.  I had to find a way to push through and there was no way I could make it on my own.   I needed help Bigtime!  &lt;br&gt;
 &lt;br&gt;
I first sought help for my mental by getting a chakra balancing/tapping session from my friend, @ramibesjoni.  That kid has a gift!  I opened my laptop right after my session and what do you know - I suddenly could understand what I was reading.   It’s amazing what a little energy work can do.   That night I started tackling some of the code challenge review videos and it was a long 4-hour video by one of my cohort teachers, Sam Boehen, that solidified my basic understanding of Ruby. Would it be enough to pass the code challenge?  I went over that video 3 times total and counting!  That is 12hours on one video and even longer actually, because I coded along.&lt;br&gt;
 &lt;br&gt;
The night before Phase-3 coding challenge I fell asleep on my laptop at about 10pm, and just as I knew, I did not pass the code challenge.  If you were expecting this to be a story of triumph, well …it’s not.  It a story of failure and acceptance but most importantly, PERSEVERANCE. The first time I failed a code challenge I bawled my eyes out. When the 90 minutes were up, I immediately closed my laptop and the crying commenced. I was bummed for days! That was in a previous cohort and after I failed, I took a leave of absence, unsure if I would ever attempt Data Engineer Bootcamp again. But here I am “The second time around” and I quote because this song was playing in my head the day after I failed Phase 3 code challenge. I know not from whence this song came but I had to google the song to listen to it and read the lyrics.  &lt;br&gt;
 &lt;br&gt;
This disco beat rang PESEVERANCE ----that this time I did not bend nor break nor cry.   I FAILED…but when the clock struck 90 mins, and long after I had submitted Amira.bundle, I kept working.   BigUP to Mathew Lui who took time out to help me through some of the areas I was stuck on. Massive Big Up to Sam Boehen, if it wasn’t for your mSM dance I could not have gotten as far as I did in the code challenge. &lt;br&gt;
 &lt;br&gt;
 &lt;br&gt;
What exactly is mSM? &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 msM = migrate, Seed, Model
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fyh71grrtf9awuwwt2ms0.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fyh71grrtf9awuwwt2ms0.jpg" alt="Image description" width="800" height="807"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;mSM is a dance of sort in Ruby, a check and balance, to ensure we have all the fundamentals of Ruby in place before writing class and instance methods. Our migrations gives us the table. Then we create our Models. Models describes how every instance of that class should behave so when we go to our seed file we are making instances .  Those instances, when we run rake db:seed,  the data gets seeded and populated into the database .  This is a high- level reason for the order, the dance. You can create any one of the steps first however, if you created and ran your seed file, where is the information going if you don’t have a migration(s) table?  If you are making seeds, how do you make instances if you don’t have a model? This is the reason for the order of the mSM dance!  It is the most optimal and efficient workflow to ensure you are not trying to do one thing that depends on another that doesn’t exist.   &lt;/p&gt;

&lt;p&gt;1.   Migration to Model&lt;br&gt;
 &lt;br&gt;
"Migrations are a convenient way to alter your database schema over time in a consistent way. They use a Ruby DSL so that you don't have to write SQL by hand, allowing your schema and changes to be database independent.&lt;br&gt;
You can think of each migration as being a new 'version' of the database. A schema starts off with nothing in it, and each migration modifies it to add or remove tables, columns, or entries. Active Record knows how to update your schema along this timeline, bringing it from whatever point it is in the history to the latest version. Active Record will also update your db/schema.rb file to match the up-to-date structure of your database"&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Frljoa0myiw37rii31kli.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Frljoa0myiw37rii31kli.png" alt="Image description" width="800" height="517"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fchbkeascsxwgg5zb80d0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fchbkeascsxwgg5zb80d0.png" alt="Image description" width="800" height="335"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2.  Model to Seed &lt;br&gt;
 &lt;br&gt;
Create your .rb models with singular,  lowercase names corresponding to the plural version of your migrations files, add your associations and foreign keys to your join table &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fx646fa4twyyl2cl1quel.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fx646fa4twyyl2cl1quel.png" alt="Image description" width="800" height="317"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3.  Seed to Methods&lt;br&gt;
 &lt;br&gt;
Create your seeds!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fiuj6k9cssgeokmdtguyl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fiuj6k9cssgeokmdtguyl.png" alt="Image description" width="800" height="678"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4.  Seed to Model&lt;/p&gt;

&lt;p&gt;Once you get back your models after seeding, it is time to test your macros in your .rb files before writing your instance and class methods.   Open rake console and check each of the associations in rake.  If you get correct answers, migration and seeding was done correctly. You can now move on to writing instance and class Methods.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F5bfi11cqd97yxn0t2ftc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F5bfi11cqd97yxn0t2ftc.png" alt="Image description" width="800" height="573"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you get correct answers, migration and seeding was done correctly, you can move on to writing instance and class Methods inside your Models.&lt;br&gt;
 &lt;/em&gt;&lt;br&gt;
 &lt;br&gt;
Conclusion: If you are struggling to understand Ruby fundamentals and just the process of getting through a Ruby code challenge, I believe the mSM dance will help you organize your thoughts and processes before getting into the nitty gritty of writing your instance and class method and completing the ruby code challenge deliverables.More on writing instance and class methods later.   Read my next blog to find out if I passed the coding challenge retake as failing a second time at Flatiron means using my one and only phase repeat and/or dismissal if you repeated a phase already. Welcome to SE Bootcamp!  Happy Coding!!!!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>gratitude</category>
    </item>
    <item>
      <title>What Dah Function?</title>
      <dc:creator>Amira de Moya</dc:creator>
      <pubDate>Wed, 13 Jul 2022 03:45:59 +0000</pubDate>
      <link>https://dev.to/amira_demoya_2fbe3d1fa55/what-dah-function-1h5j</link>
      <guid>https://dev.to/amira_demoya_2fbe3d1fa55/what-dah-function-1h5j</guid>
      <description>&lt;p&gt;What dah Function?&lt;br&gt;
By: Amira de Moya&lt;/p&gt;

&lt;p&gt;There came a moment in life where I decided I needed a change.  I found myself exploring different career paths on the web when I came across a blog on digital nomads. The picture of the girl on the beach, a new country, the hot sun, a coconut in one hand, computer on her lap, working on something that made a difference in the world (I imagined), just drew me in. &lt;/p&gt;

&lt;p&gt;Months later it was Day 1 of Flatiron School Software Engineer Intensive.   After making it through a month and a half of Prep Work, I was finally here and boy, did reality set in fast with  JavaScript.  I was doing fifteen-hour days and was really feeling like an imposter. For the life of me I could not grasp functions.   I know this might sound very basic but as a Singer/Songwriter who dropped her computer science class in college after just one class, transitioning into tech would not be easy. I knew this!  I was not deceived by the clever marketing that targeted my social media. However, with perseverance, a lot of practice, and Google, the synapse in my brain fired and functions, it finally clicked.  So, if you are where I was, wondering if this is for you, head heavy with Imposter Syndrome, asking yourself “What Dah Function?”&lt;/p&gt;

&lt;p&gt;Function &lt;/p&gt;

&lt;p&gt;A function, a basic yet integral fabric of JavaScript is an action word. Instead of performing similar tasks individually, writing repetitive code, a function allows us to group similar tasks together.  Then, when we call the function everything inside the swirly brackets {} gets executed giving us a result.  &lt;/p&gt;

&lt;p&gt;Function Declaration&lt;/p&gt;

&lt;p&gt;A basic function is created with an expression that begins with the keyword function. It can be an anonymous or a named function as noted below.&lt;/p&gt;

&lt;p&gt;function greet(){&lt;br&gt;
    console.log('Hello JavaScript Beginner');&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;greet();&lt;/p&gt;

&lt;p&gt;// Hello JavaScript Beginner&lt;/p&gt;

&lt;p&gt;or it can have a parameter or multiple parameters.  A function has a body that contains a block of code to be executed once the function is called.  &lt;/p&gt;

&lt;p&gt;function greet(name){&lt;br&gt;
    console.log('Hello ‘  +  name);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;greet(‘Tavian’);&lt;/p&gt;

&lt;p&gt;//Hello Tavian.                                  &lt;/p&gt;

&lt;p&gt;function greet (name, lastName) {&lt;br&gt;
    console.log('Hello ' + name + ' ' + lastName);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;greet('Tavian', 'Braddick');&lt;/p&gt;

&lt;p&gt;//Hello Tavian Braddick&lt;/p&gt;

&lt;p&gt;Source:&lt;br&gt;
&lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Functions&lt;/a&gt;&lt;br&gt;
Eloquent JavaScript Marjin Harvebeke &lt;/p&gt;

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