Open in app

Sign In

Write

Sign In

Josiah Fordahl
Josiah Fordahl

1 Follower

Home

About

Apr 17, 2021

Object Passing & Mutability in Ruby

Variable Assignment and Variable References in Ruby: In ruby our assignment operator = allows us to point variables at objects. Let us jump into some code and explore this further. Below we will assign two variables to a single string object and see how this works. acknowledgement = "Hello" acknowledgement.object_id…

Object Passing

4 min read

Object Passing & Mutability in Ruby
Object Passing & Mutability in Ruby
Object Passing

4 min read


Apr 16, 2021

Ruby Array Iterators

Here we will cover the differences and use cases for Array#each, Array#map, and Array#select. What is the difference? Array#each is used for iteration. #each is preferred by Rubyists in place of using a for loop. …

Array Methods

4 min read

Array Methods

4 min read


Apr 16, 2021

Under the Hood of Ruby Array #Sort

The following article will attempt to thoroughly and precisely explain how the following code snippets work: ["Aa", "AAA", "b", "aa", "Aaa"].sort [100, 77, 200, 7, 21].sort When sorting Strings, Array#sort uses the return value of the combined comparison operator (also known as the spaceship operator) String#<=> and the ASCII (hexadecimal)…

Ruby

7 min read

Under the Hood of Ruby Array #Sort
Under the Hood of Ruby Array #Sort
Ruby

7 min read


Mar 5, 2021

Collection Methods in Ruby

Methods that call a block repeatedly are called iterator methods. Iterating through Arrays with #each #each when used on an array passes a single parameter to the block. Suppose we have an array of days of the week, and we want to loop through, capitalize and output each day of the week. week = […

Ruby Each

2 min read

Collection Methods in Ruby
Collection Methods in Ruby
Ruby Each

2 min read


Mar 5, 2021

Understanding Ruby Blocks

Starting from the basics: A single line block: { p "example string" } Multi-line block: do p "example string" end A block cannot be run directly, instead the block needs to be associated with or attached to a method call: # Single line example: 2.times(method_param) { puts "example string" } …

Ruby

4 min read

Understanding Ruby Blocks
Understanding Ruby Blocks
Ruby

4 min read


Feb 14, 2021

Basic Markdown Language Syntax

Markdown is lightweight markup language that is used in plaintext documents to add forming elements. Writing in markdown is slightly different than using a WYSIWYG editor. Markdown doesn’t immediately show the changes to the document as you press buttons like “Bold”, instead with markdown you annotate the formatting you wish…

Markdown

1 min read

Basic Markdown Language Syntax
Basic Markdown Language Syntax
Markdown

1 min read


Feb 12, 2021

Local Variable Scope in Ruby

How local variables interact with method invocations, blocks, and method definitions. What types of variables does Ruby have? For the purpose of this article, a variable is just a label. It gives you, the programmer, the ability to name an object in your code. Ruby has several types of variables, all defined by where they are accessible…

Ruby

4 min read

Ruby

4 min read


Jan 7, 2021

Breaking Down Programming Problems into Manageable Sizes

Combining the Two Layer Approach and PEDAC Framework to Solve Programming Problems Launch School, where I attend Software Engineering School, talks extensively about when you start out as a programmer that there are two layers to every problem: Layer 1.) The logic layer Layer 2.) The language syntax layer The…

Programming Problem

6 min read

Breaking Down Programming Problems into Manageable Sizes
Breaking Down Programming Problems into Manageable Sizes
Programming Problem

6 min read

Josiah Fordahl

Josiah Fordahl

1 Follower
Following
  • Launch School

    Launch School

  • Chris Lee

    Chris Lee

  • Callie Buruchara

    Callie Buruchara

  • Harshit Tyagi

    Harshit Tyagi

  • Olivier Butterbach

    Olivier Butterbach

See all (11)

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech