<?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: maryredlinger</title>
    <description>The latest articles on DEV Community by maryredlinger (@maryredlinger).</description>
    <link>https://dev.to/maryredlinger</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%2F289817%2F0b2840a0-e17e-4824-b8e4-8e0d777ae8a8.png</url>
      <title>DEV Community: maryredlinger</title>
      <link>https://dev.to/maryredlinger</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/maryredlinger"/>
    <language>en</language>
    <item>
      <title>week 4</title>
      <dc:creator>maryredlinger</dc:creator>
      <pubDate>Sun, 05 Jan 2020 20:40:50 +0000</pubDate>
      <link>https://dev.to/maryredlinger/week-4-172b</link>
      <guid>https://dev.to/maryredlinger/week-4-172b</guid>
      <description>&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Week 4
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Coming up on finishing our first month of the bootcamp, we finally began our learning of Ruby. Ruby is the nicest language so far. Why is that? Because of MINASWAN. Matz is nice and so we are nice.&lt;/p&gt;

&lt;p&gt;Ruby is object oriented.Everything in Ruby is an object, dynamically typed, a scripting language, and written line by line.&lt;/p&gt;

&lt;p&gt;To simply display some text or integers in Ruby you can use 'puts', 'prints', or 'p' followed by your text or so in single quotes. If you were to pass punctuation in Ruby, you would use double quotes = "". String interpolation looks like "#{}" and Arrays appear the same as they would in JavaScript.&lt;/p&gt;

&lt;p&gt;Ruby has a lot of methods that can be applied. Some of these methods we learned include:&lt;/p&gt;

&lt;p&gt;lets use this as our example:&lt;/p&gt;

&lt;p&gt;nums = [ 13, 5, 17, 4, 10, 5 ]&lt;/p&gt;

&lt;p&gt;.length (will display the length of the array)&lt;/p&gt;

&lt;p&gt;puts nums.length -&amp;gt; 6&lt;/p&gt;

&lt;p&gt;.first (will display the first variable)&lt;/p&gt;

&lt;p&gt;puts nums.first -&amp;gt; 13&lt;/p&gt;

&lt;p&gt;.last (will display the last variable)&lt;/p&gt;

&lt;p&gt;puts nums.last -&amp;gt; 5&lt;/p&gt;

&lt;p&gt;.include? (returns a boolean regarding of that variable is included)&lt;/p&gt;

&lt;p&gt;puts nums.include?4 -&amp;gt; true&lt;br&gt;
 puts nums.include?6 -&amp;gt; false&lt;/p&gt;

&lt;p&gt;.reverse (will reverse the order)&lt;/p&gt;

&lt;p&gt;puts nums.reverse -&amp;gt; [ 5, 10, 4, 17, 5, 13 ]&lt;/p&gt;

&lt;p&gt;There is another type of methods in Ruby called mutator methods. Mutator methods change one or more of the variables in an object. Mutator methods are also known as setter methods. We can use the shovel &amp;lt;&amp;lt; method to add variables to an already existing object.&lt;/p&gt;

&lt;p&gt;Conditionals in Ruby are similar to JavaScript in terms of needing an if else and end. However, in Ruby the format is a little different. We will be using if, else, elsif, and end.&lt;/p&gt;

&lt;p&gt;Now lets get into classes and inheritance. Some of the syntax and language we will be using is capitalizing the first letter of the class name, using 'def' to define our method, using '_' rather than camelCase, and using @ for our instance variables.&lt;/p&gt;

&lt;p&gt;Lets take a peak at a simple Ruby code with class:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Bike
 def set_color(new_color)
  @color = new_color
 end
 def describe
  "This bike is the color #{color}"
 end
end

bike = Bike.new
bike.set_color("Red")

puts bike.describe

#this will return " This bike is the color Red
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Next topic in Ruby was class inheritance. As the internet likes to say, "in object-oriented programming, inheritance enables new objects to take on the properties of existing objects". Similar to React components, we have Ruby inheritance.&lt;/p&gt;

&lt;p&gt;To inherit from another class we use the less than symbol showing one class taking from another like so :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Apple &amp;lt; Fruit
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;We can apply this to our Bike class by creating multiple classes of different bike style. With multiple instance variables starting off in our Bike class, we can manipulate those variables in each of our new classes depending on our bike. &lt;/p&gt;

&lt;p&gt;Lets take a peak of what this code would look like using a fruit example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Fruit

 def initialize color
  @color = color
 end

 def color
  @color
 end

 def is_sweet
  true
 end

end

class Apple &amp;lt; Fruit

 def initialize color
  super color + "Apple"
 end

 def spoils
  "Spoils in 7 days"
 end

end

apple_one = Apple.new("Red")
apple_one.color

-&amp;gt; "Red Apple"

apple_one.ist_sweet

-&amp;gt; true

apple_one.spoils

-&amp;gt; "Spoils in 7 days"

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Some of the challenges we did this week included a Ruby car challenge, text based story game, and creating a task list. We also spent a day doing test driven development, TDD, in Ruby which is called RSPEC. We started by writing out our expectations for the code, running our code to fail, going back into our code writing just enough to pass, and then continuing with our testing until we have a completed code.&lt;/p&gt;

&lt;p&gt;Ruby to me is a cleaner and easier to read form of JavaScript. It was a great week and a great way to finish out our first month&lt;/p&gt;

&lt;p&gt;Checking out!&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>devjournal</category>
      <category>codingbootcamp</category>
    </item>
    <item>
      <title>Week 3</title>
      <dc:creator>maryredlinger</dc:creator>
      <pubDate>Tue, 31 Dec 2019 00:29:22 +0000</pubDate>
      <link>https://dev.to/maryredlinger/week-3-cdm</link>
      <guid>https://dev.to/maryredlinger/week-3-cdm</guid>
      <description>&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Week 3
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Week 3 brought us to our first introduction to React. React made sense to me early on, but it definitely took some organization when it came to classes extending each other and state.&lt;/p&gt;

&lt;p&gt;We began our first day by learning about React components. Components are the building blocks for React. They are a JavaScript class or function that takes in an input and returns a React element. Within components you can create a class component and a function component. In React, classes and functions start with an Uppercase letter and are CamelCased.&lt;/p&gt;

&lt;p&gt;Create React App is a file structure with codes written by others which are then given to developers to use. It makes it faster and easier for developers to write code when this command is run. We used this command to start us off on creating some React projects of our own.&lt;/p&gt;

&lt;p&gt;Lets first look at a basic set up for a React code:&lt;/p&gt;

&lt;p&gt;import React, { Component } from 'react',&lt;/p&gt;

&lt;p&gt;class App extends Component{&lt;br&gt;
  render (){&lt;br&gt;
   return(&lt;br&gt;
    &lt;/p&gt;
&lt;br&gt;
     &lt;br&gt;
    &lt;br&gt;
   )&lt;br&gt;
  } &lt;br&gt;
}

&lt;p&gt;export default App&lt;/p&gt;

&lt;p&gt;class Counter extends Component{&lt;br&gt;
 constructor(){&lt;br&gt;
  super()&lt;br&gt;
   this.state = {&lt;br&gt;
    counter : 0&lt;br&gt;
   }&lt;br&gt;
 }&lt;/p&gt;

&lt;p&gt;addOne = () =&amp;gt; {&lt;br&gt;
  this.setState({ counter : this.state.counter + 1 })&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;render(){&lt;br&gt;
  return(&lt;br&gt;
   &lt;/p&gt;
&lt;br&gt;
    Counter: {this.state.counter}&lt;br&gt;
   &lt;br&gt;
  )&lt;br&gt;
 }&lt;br&gt;
}

&lt;p&gt;Thats a lot going on up there so lets break it down. The first class , App, will be where our work in Counter will be displayed. Its only purpose is to display our finished product. In our Counter class we are setting a state for counter which is 0. We then created a method called addOne which will increase the state of counter by 1 each time the method is called and hence setState the state of counter to 1 rather than 0 and so on. In our render, we are writing some html code to display the text :Counter: " followed by the current state of counter.&lt;/p&gt;

&lt;p&gt;Now that we know a little about state, we then were introduced to props. Props are a way of passing state into even more classes and functions. We do this by calling this.props rather than this.state in the classes that do not have the constructor and super stating this.state.&lt;/p&gt;

&lt;p&gt;Some of our challenges from this week included creating a React dice roller, treasure hunt, and TicTactToe. I had a blast learning React and working through the challenges. It was very frustrating when our code wouldn't work due to a syntax error we didn't recognize for a bit. All in all it was another good week done. &lt;/p&gt;

&lt;p&gt;Checking out!&lt;/p&gt;

</description>
      <category>devjournal</category>
    </item>
    <item>
      <title>Week 2</title>
      <dc:creator>maryredlinger</dc:creator>
      <pubDate>Mon, 16 Dec 2019 17:25:55 +0000</pubDate>
      <link>https://dev.to/maryredlinger/week-2-458e</link>
      <guid>https://dev.to/maryredlinger/week-2-458e</guid>
      <description>&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   WEEK 2
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This week we learned about JSON objects and classes. &lt;/p&gt;

&lt;p&gt;A JSON object is a kay value pair in a variable. An example of this would be var person = { name : “Alex”, phone : 123456789} where the key is the name and phone while the value is “Alex” and 123456789. We can access these properties with dot notation such as person.name which would display “Alex” and person.phone would display 123456789. Objects are collections of key value pairs. Calling on this. followed by the key is also a way of calling on the scope for the object of that function.&lt;/p&gt;

&lt;p&gt;Now lets dive into Javascript Classes. Classes are the blueprint that will later be called on by extending said class through another class. Classes have a constructor which makes it run in .log and it also has data and behavior which has a new that calls on that blueprint. So lets bring this all together in an example.&lt;/p&gt;

&lt;p&gt;// class names have to be capitalized &lt;br&gt;
class Book {&lt;br&gt;
//dont forget to call on your constructor so it can run&lt;br&gt;
    constructor() {&lt;br&gt;
// we are setting the state for the current page which is 0&lt;br&gt;
        this.currentPage = 0&lt;br&gt;
    }&lt;br&gt;
// when turnPage is called on the state of currentPage will increase by 1 and reassign its value from 0 to 1&lt;br&gt;
    turnPage() {&lt;br&gt;
        this.currentPage += 1&lt;br&gt;
    }&lt;br&gt;
// when readPage is called on, it will display the string that will tell you the page you are currently on&lt;br&gt;
    readPage(){&lt;br&gt;
        return &lt;code&gt;you are on #{this.currentPage}&lt;/code&gt;&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Destructuring was also brought up this week. Restructuring is a great way to have cleaner code and makes it easier to call on a certain key value pair. &lt;/p&gt;

&lt;p&gt;var{ name, author } = book&lt;br&gt;
console.log(name, author)&lt;/p&gt;

&lt;p&gt;we can do this similarly with dot notation&lt;/p&gt;

&lt;p&gt;console.log(book[“name”], book[“author”])&lt;br&gt;
console.log(book.name, book.author)&lt;/p&gt;

&lt;p&gt;Getting a little deeper into class, we learned about class inheritance next. Class inheritance is a way for a child class to inherit from a parent class which is being extended. It is a very similar setup for class but we will be adding another class. Lets show a quick example of what this would look like in Javascript:&lt;/p&gt;

&lt;p&gt;//class Bike is our parent class&lt;br&gt;
class Bike {&lt;br&gt;
    constructor () {&lt;br&gt;
        this.speed = 0&lt;br&gt;
    }&lt;br&gt;
    accelerate(){&lt;br&gt;
        this.speed += 10&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;//now we are getting into the child class which is pulling from our parent class Bike&lt;br&gt;
class RoadBike extends Bike {&lt;br&gt;
    accelerate(){&lt;br&gt;
//this.speed will change from the parent which adds 10 to be specific to RoadBike which will add 20&lt;br&gt;
        this.speed += 20&lt;br&gt;
    }&lt;br&gt;
    applyBrakes(){&lt;br&gt;
        this.speed -=10&lt;br&gt;
    }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;We also learned about testing with JEST and yarn. Some commands I now know are mkdir (which makes a new directory), cd (change directory), touch (create a new file), atom . (to start the cd in atom), as well are yarn add jest, yarn jest, and describe. Writing tests seemed a little backwards to me. We first start by writing a test to fail and then adding in more code to pass. This is red green refactoring. We start with the least amount of code to fail then add the least amount of code to pass. Testing is a great way to have more efficient code.&lt;/p&gt;

&lt;p&gt;Classes gave me a bit of trouble that week. I understood the concept and how it worked but the new syntax was giving me a lot of trouble to understand at first. Writing this blog 2 weeks post learning, I am seeing how confident in class and objects I am. All in all, it was a good week. Checking out!&lt;/p&gt;

</description>
      <category>devjournal</category>
    </item>
    <item>
      <title>Lets start at the very beginning . . </title>
      <dc:creator>maryredlinger</dc:creator>
      <pubDate>Wed, 11 Dec 2019 00:49:11 +0000</pubDate>
      <link>https://dev.to/maryredlinger/lets-start-at-the-very-beginning-5376</link>
      <guid>https://dev.to/maryredlinger/lets-start-at-the-very-beginning-5376</guid>
      <description>&lt;p&gt;I am now 3 weeks into my bootcamp, so through the next 3 blogs lets recap everything I have learned thus far:&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WEEK 1
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Week 1 was all about an introduction to javaScript. &lt;/p&gt;

&lt;p&gt;We started off by learning DataTypes such as number(7), string("Hello"), Boolean(true/ false), Undefined, Null, and Symbol. Type Coercion and implementing variable is what we were introduced to next. Type Coercion includes evaluating (==) or a strict evaluation (===) and seeing if the variable does not evaluate equal or true (!= or !===) with a bang(!).&lt;/p&gt;

&lt;p&gt;Next we began learning about Arrays[] and Array Methods. Some Methods we learned include unShift(adds a value to the beginning), pop(removes the last value), reverse(reverse the order of an array), and join(converts an array into a string). We began to implement our learning by declaring a function and calling our input through the console.log to compare values, data type, and mess around with methods.&lt;/p&gt;

&lt;p&gt;Then came the if, else, and else if statements as well as higher order functions with for loops and array methods such as .map(takes variables and index) and .filter(only gives values that name this condition to be true). We began to map and filter over arrays to return a value and did so through different challenges given to us by our instructors.&lt;/p&gt;

&lt;p&gt;And that ladies and gentlemen wrapped up my first week at bootcamp!&lt;/p&gt;

&lt;p&gt;I was able to comprehend a lot more than I was expecting too and also wasn't as mentally, physically, and emotionally exhausted as I thought I might be. I was excited to be there and looking forward to the week to come!&lt;/p&gt;

&lt;p&gt;Checking Out!&lt;/p&gt;

</description>
      <category>devjournal</category>
    </item>
  </channel>
</rss>
