Photo by Valeriia Bugaiova on Unsplash

Sorting Out Feeling(s) with Ruby

Jake Mills
5 min readJul 27, 2020

I have a problem. Well, more like, I have feelings. It sounds like I’m trying to say that my feelings are a problem, which I’m not, but they are starting to FEEL that way.

Showing myself out.

I just started a fully immersive course in Software Engineering through the Flatiron School. Well, it’s supposed to be fully immersed, but due to a certain pandemic that should not be named, it’s more of an immersion via Zoom & Slack from the comfort of my parents basement in the middle of Stafford, VA about an hour south of our nation’s capital. I was hoping to be doing this in person in NYC, but again, thanks to COV…*cough*…I mean, IT that should not be named, I’m here. I’m here, trying to switch from touring the country as an actor, to diving head first into the digital world and languages that keep this Earth of ours connected. ALL that to say…I’m overwhelmed.

So, to help me sort all of these feelings out I’m looking at my main squeeze over the last two weeks, Ruby.

Ruby + Me

I’m going to define myself as a class called Feeler and my feelings as a class called Feeling. If we think about the relationship between feelings and myself, you could say that I have a lot, or have many, feelings, and feelings are my own, or belong to me. OR. The Feeler HAS MANY Feelings, and the Feelings BELONG TO the Feeler. Let’s set ’em up!

class Feeler
attr_accessor :name
@@all = []def initialize(name)
@name = name
@@all << self
end
def self.all
@@all
end
end
class Feeling
attr_accessor :feeler, :name
@@all = []def initialize(feeler, name)
@feeler = feeler
@name = name
@@all << self
end
def self.all
@@all
end
end

Okay. Now that I’ve set up my classes, it’s time to start sorting through all my feelings.

> jake = Feeler.new("Jake")
=> #<Feeler:0x00007fb3541cf2a0 @name="Jake">

During the first two weeks of this camp I have felt entirely lost at times, but also so accomplished. I have been destroyed, on the brink of quitting, and I’ve been cocky, feeling like I’m God’s gift to coding (which I’m not, like, I’m really not…like…at all). I had done over 100 hours of prep work, been accepted, and was looking towards the future. I was ready to start this journey. I guess, the first thing I felt was excitement.

class Feeler  # ^^^Other Methods^^^  def new_feeling(feeling)
Feeling.new(self, feeling)
end
end
> jake.new_feeling("Excitement")
=> #<Feeling:0x00007fbea4954010
@feeler=#<Feeler:0x00007fb3541cf2a0 @name="Jake">,
@name="Excitement">

Day one of my cohort begins. I strut down the two flights of stairs to my parent’s basement, coffee in hand. Log in to Zoom. And Boom. Anxiety.

> jake.new_feeling("Anxiety")
=> #<Feeling:0x00007fb356076a50
@feeler=#<Feeler:0x00007fb3541cf2a0 @name="Jake">,
@name="Anxiety">

Isn’t it crazy how that can happen? You feel complete control, or positivity, and it’s gone in a moment. That impostor syndrome kicks in and you almost forget everything you’ve learned. But, be honest with yourself, you haven’t forgotten everything. It’s still there. It’s the anxiety that’s kicking in, creating self doubt. That feeling of excitement is somewhere inside of you. Since our Feeler class has many feelings, we have access to our Feeling class. Let’s create a method to just make sure our excitement is still there.

class Feeler  # ^^^Other Methods^^^  def feelings
Feeling.all.select do |feeling|
feeling.feeler.name == self.name
end
end
end
> jake.feelings
=> [#<Feeling:0x00007fb354114ea0
@feeler=#<Feeler:0x00007fb3541cf2a0 @name="Jake">,
@name="Excitement">,
#<Feeling:0x00007fb356076a50
@feeler=#<Feeler:0x00007fb3541cf2a0 @name="Jake">,
@name="Anxiety">]

See! It’s still there, so we should be able to generate that feeling again. Right now, our feelings are only showing up as full objects, it’s a bit much. Let’s create another method for displaying only the names of our feelings.

class Feeler# ^^^Other Methods^^^  def feeling_names
self.feelings.map do |feeling|
feeling.name
end
end
end
> jake.feeling_names
=> ["Excitement", "Anxiety"]

That’s MUCH easier to read. And, it’s nice to know that as much as our bad feelings, like anxiety, make us feel, our good feelings, like excitement, are still there. They are waiting for that next moment to be busted out.

Sometimes we need someone to check in to see how we are doing, or to remind us that everything is going to be okay. Let’s have Ruby help.

class Feeler# ^^^Other Methods^^^  def how_are_you_feeling?(feeling)
"I'm feeling #{feeling}."
end
end
> jake.how_are_you_feeling?("Excitement")
=> "I'm feeling Excitement.

Now, when Ruby asks me how I’m feeling I can insert one of my feelings that I’ve felt as a string. But, like I said, I’ve been feeling a lot of things. Sometimes I don’t even know how I’m feeling. What if I don’t know what to say to Ruby? Let’s make our feeling argument optional for when we are uncertain.

class Feeler# ^^^Other Methods^^^  def how_are_you_feeling?(feeling = "I'm not sure")
"I'm feeling #{feeling}."
end
end
> jake.how_are_you_feeling?
=> "I'm not sure how I'm feeling."

Ruby just, gets me, ya know? She understands when I’m feeling something I’ve felt before, or when I don’t know what I’m feeling at all. That’s all well and good, but what if Ruby asks me this question and I have a new feeling? Like triumph for finishing my first blog!? Let’s make this question even more dynamic!

class Feeler# ^^^Other Methods^^^  def how_are_you_feeling?(feeling = "I'm not sure")
if self.feeling_names.include?(feeling.capitalize)
"I'm feeling #{feeling.downcase}."
elsif feeling == "I'm not sure"
"#{feeling} how I'm feeling."
else (defined?(feeling) == nil)
self.new_feeling(feeling.capitalize)
"I'm feeling #{feeling.downcase}...this is new for me."
end
end
end
> jake.how_are_you_feeling?
=> "I'm not sure how I'm feeling."
> jake.how_are_you_feeling?("Excitement")
=> "I'm feeling excitement."
> jake.how_are_you_feeling?("triumph")
=> "I'm feeling triumph...this is new for me."
> jake.feelings
=> [#<Feeling:0x00007fb354114ea0
@feeler=#<Feeler:0x00007fb3541cf2a0 @name="Jake">,
@name="Excitement">,
#<Feeling:0x00007fb356076a50
@feeler=#<Feeler:0x00007fb3541cf2a0 @name="Jake">,
@name="Anxiety">,
#<Feeling:0x00007fb351010e38
@feeler=#<Feeler:0x00007fb3541cf2a0 @name="Jake">,
@name="Triumph">]
> jake.feeling_names
=> ["Excitement", "Anxiety", "Triumph"]

With the help of Ruby I am able to sort through my feelings with ease. These last two weeks have taught me a lot, but most of all they’ve taught me what I can accomplish when I fully immerse myself into learning. If you ever feel like you’re struggling to learn something new, like software engineering, know that we all have been there one way or another. And the feelings that you have felt, both good and bad, come and go. Take a second. Sort through your feelings. Breathe. And triumph.

I feel better already.

--

--

Jake Mills
Jake Mills

Written by Jake Mills

Software Engineer hailing from the Empire State, writing about what interests me and hoping someone else finds it interesting too. 👨🏻‍💻 🤓 He/Him #LFGM

No responses yet