Revisiting Ruby from Scratch Again

Lawson Hung
3 min readFeb 21, 2020

Since I graduated from Flatiron School, I was pretty burnt out from writing code. Specifically, I was trying to get my authentication to work and just getting the password to work was a huge headache for me. It took me a whole week to finally get my password to work, whereas my classmates seemed to have already gotten theirs to work and had moved on with their projects. I felt like an idiot compared to them. Why did it take me an entire week to get it, when it took my classmates much less time? As I speak up more about mental health and personal self-care, I am trying to be more aware of comparing myself to other people.

ANYWAY, this post isn’t about mental health awareness and I don’t want to go down that route here. So I was burnt out from Flatiron, and was avoiding writing any code and building any projects. Until recently, my career coach that Flatiron pairs us up with 1 on 1 prompted me to try to make a new project and I realized that I had forgotten a lot of stuff.

So I’m going all the way back to my Mod1 labs and redoing everything to pretty much re-learn everything.

As you can see, I made a ton of comments. I figured that I probably wouldn’t go back a third time to re-do these labs so why not make the best of it and make as many comments as I can. Also, it helps with my technical terms to type up a ton of comments.

So I’m just basically going to rephrase everything that’s in this screen shot.

I first created a Dog class with the following code:

class Dogend

Now that I have a Dog class, I can create instances of the Dog class. I named my first dog “fido”.

fido = Dog.new;

Now when I puts fido to the terminal, I get an object identifier. For easier debugging and to make things clear, I also puts to the terminal:

puts "`fido`'s object identifier is: " + fido.to_s;

.to_s turns that Object Identifier to a string so that it can be put to the terminal. To me, an Object Identifier is saying this is the location of memory space in the computer that the object created is located. I’m not a computer science guy, so I don’t know for sure, but that’s my guess so don’t take my word for it!

I also created two other dogs for practice, snoopy and lassie.

And that’s all! Personally, I’m hoping to respark my love for writing code and enjoy it again!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Lawson Hung
Lawson Hung

No responses yet

Write a response