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-
step 1- convince your engineering team to let you configure a dev environment on your computer
step 2- insist on figuring it out yourself
step 3- do not ask for help
step 4- throw your computer out the window in a violent rage
long story short- I am set up to start building shit and it took me a week to figure out how to get to the point where i could even pretend to start learning to code.
to dumb it down (since no one ever does)- a dev environment is basically a copy of all the code and databases that run something, but it sits on your local desktop. you play with changes here, then when you’re ready, push a copy of the code into the production world.
what they don’t tell you is how BLOODY FREAKING IMPOSSIBLE it is to set this up.
so you’re young and fresh and ready to start learning to code, and the FIRST thing you have to do is actually more challenging than writing the fucking code itself.
so be warned- it’s hard. the documents don’t account for 90% of the shit you need to do because it was written by someone on an ENTIRELY DIFFERENT COMPUTER. and they forgot that they already fucking HAD an SSH key on git hub. and they already had xcode. and they had access to the password to create the database.yml file. and oh yeah, this was written back when the most recent version of rails was 4.1.1 and no one has upgraded so if you don’t SPECIFICALLY install a random old version, yours won’t work, but you do THEN have to separately add a bunch of Gems or it won’t work. oh and you’ll obviously need to reconfigure a bunch of shit so you have access to actually install some of the stuff where you can’t call out SUDO because it’s in the library.
so yeah. fuck you last week.
i will say however, that when you get it to work for the first time, you WILL feel like you’ve just performed the single greatest engineering feat in the history of the company. and everyone should lower their eyes in your presence because you are a god among tech.
engineering is so dramatic, damn.