Not gonna lie, i’m pretty proud of myself today. Not for any remarkable coding feat but in how
I worked around not knowing shit but still ask questions properly.
Here’s how things went down…
So I built a fairly impressive dashboard through a combination of piecing together existing code and adding some new models and controllers and blah blah blah.
And while I was pretty proud, I still feel like I don’t have a fundamental understanding of what I did and how i would fix it when it broke.
So I set off to do the grunt work. Building a brand new page and switching out every piece of code to make sure I understood the structure and rules.
Which, okay, random side vent- this whole ruby “magic” thing is such crap for beginners. It basically makes everything just “work” and it’s impossible to really understand why. This is the second time I’m finding myself on the “visibility and referencial integrity > simple and easy.”
Anyway, so i’m trying to figure out what kind of a word “index” is. When you write “def index” in a controller file, then make an index views file it works. But type in “index1” and it fails.
So i’m trying to understand if this is a Ruby specific “word” or if it’s been mapped somewhere else in the code base.
And asking the question like that isn’t exactly elegant.
So, I google around to find a nice glossary of terms and there isn’t quite one that easily maps back to the code base i’m working with. they’re all more general.
And I’m staring at my pretty color coded sublime text file and it hits me! There’s has to be a settings file that tells it what colors to put the different words in. So I google around, find the git hub repo and boom- instant glossary of every kind of word in your syntax with it’s color.
So next time I need to ask what something does I can look at the mapping, realize all the orange ones are “functions” and not only sound smart, but most likely answer the question myself with google.
Not that anyone reading this would ever need this but for posterity, the code-