Objects in Theory

Melissa Guachun
3 min readJan 31, 2021

--

Theory and criticism caught my attention in the early years of my college career. My copies of Foucault, Anzaldúa, and Gramsci would be annotated til they were undecipherable with notes bursting from the margins. In my mind, theory was the study of literature, the nature of it’s principles for analysis, and a subject I thought was my strong suit.

Years later, my bundle of annotated notes are stored away in a drawer and I sit hunched over my computer trying to decode the plain English on the lab article. Objects are abstract entities that contains data and behaviors. Technically, (almost) everything in Ruby is an object, similar to Gramsci’s theory of hegemony, objects have been hiding in plain sight.

For some reason, I still found the theory of objects too abstract for my liking. I understood theory to be long winded concepts that were coded in flowery diction, not as concepts blinking on a stark terminal interface. Over time I became more lost within the jargon of Object Orientation Ruby. Between the instance methods, classes, attr_accessor, initializer, setter/getter, dot notation, theories began building on top of one another to the point I couldn’t tell what I was looking at. The theory I once beloved was turning against me.

It became clear that I had to act in a similar manner with my annotated notes and mentally store away my knowledge of literary theory to make space for a new class of theory.

class Theorydef person_thinksputs "Theory is Foucault, Anzaldúa, Gramsci"endendmelissa = Theory.newmelissa.theory#=> "Theory is Foucault, Anzaldúa, Gramsci"

Above is my former mind.
The class is defined as Theory.
The body of the Theory class has an instance method of person_thinks.
If the person_thinks method is called and invoked it will return the output of “Theory is Foucault, Anzaldúa, Gramsci”.

Instead of binging on cinnamon rolls in a depressive fugue state I decided to look for supplemental content to deepen my study. Thanks to my cohort’s slack line, they suggested Ruby monk and with my handy notebook and laptop I began another investigation into the theoretical world of objects.

In all honesty, I knew I wasn’t going to one day connect the dots (notation?) and become a Ruby Object Orientation genius over night. If I’m being authentic with myself I still don’t totally understand everything I’m learning about objects. What I can say is that once foggy perception of the concepts are becoming a little more in focus with each attempt in study. Part of the reason why I was so adept in literary theory was my unyielding attitude to put pen onto paper. The same approach must be done with code in order to put your knowledge to practice.

The best I can do is work on objects a little bit each day.

class Theorydef person_thinksputs "Theory is Foucault, Anzaldúa, Gramsci"endendmelissa = Theory.newmelissa.person_thinksclass New_Theorydef coder_thinksputs "Theory can also be found within objects in Ruby. Objects are abstract entities that contains data and behaviors.They an contain a class which brings the object to life and define their methods.They can also have instance methods which are unique and only work within a specific class. "endendmelissa = New_Theory.newmelissa.coder_thinks

--

--

Melissa Guachun

Software Developer and visual artist based in NYC. Join me on my journey to coding enlightenment or a torrential mental breakdown, whichever comes first.