Enter Wizard Boy

As kids, my sister and I LARPed (Live Action Role Play), as many kids did before iPads and Fortnite and smartphones. We each had our own hero alter-ego. I was Wizard Boy–I’ve always been obsessed with fantasy and the supernatural, but I wasn’t a super creative kid. You would think for a wand I’d have found a good twig to use, but you’d be mistaken. At the time, there was a show on Disney Channel called Kim Possible and my favorite character was Wade, a 10-year-old tech genius. In the show, he mostly existed on the PDA (look it up) he programmed for Kim, where he could be seen and heard clacking away on his keyboard, making magic happen to save the day. As cool as Kim was, being a spy or whatever, I knew the real MVP was Wade, for Kim would be nothing without all the tech Wade made for her.

Anyway, my siblings and I lived with our grandparents and we didn’t own a computer, but one day while exploring the wild jungle that was their garage, I found a keyboard. It was kismet. From then on, Wizard Boy was a keyboard-wielding mage, vanquishing evil from the land one keystroke at a time. Point being, from a young age, I knew software engineers were modern day, real life magic users.

In addition to being an aspiring wizard as a kid, I was also quite the stubborn smartass. A smartass with an incessant need to understand underlying meaning in everything.

Adult: “The sky is blue.”
Me: “Why?”
Adult: “Because it is.”
Me: “Okay. But why?
Adult: “I’m not a scientist, I don’t know.”
Me: “WELL WHY AREN’T YOU?”
Scientist: “The sky is blue because the gases in our atmosphere scatter the light from the sun. Blue light gets scattered more than any other color because it has the shortest wavelength, thus having the highest frequeny and carrying the most energy, translating to us perceiving the sky as blue most of the time.
Me: “Awesome! But.. Why?”

Needless to say, this quality became a core part of who I am.

15 Years Later

Fast forward to today and here I am, actually learning to become the wizard young me aspired to be. It’s definitely not as magical as I thought it would be, though. Or maybe, it’s too magical.

As I’m progressing through each phase at Flatiron, though, these two parts of myself are beginning to conflict. At Flatiron, we are learning all the latest concepts, practices, and frameworks. All the cutting edge spells and potions. While it’s awesome, and deploying a whole web app with just a few spells, a few commands in the terminal, really feels like performing magic, my more analytical self is really struggling to accept it.

To be fair, my instructors at Flatiron are awesome—true wizards with vast knowledge and mastery of the programming arts. Despite this mastery, they simply could not teach us all the low-level computer knowledge I seek. Their job is to prepare us to become employable devs in 15 weeks, not squeeze in all the knowledge you’d learn in a 4+ year Computer Science degree. Lucky for us, we now live in a time where you don’t need all that CS knowledge to be an employable dev.

Ruby, ActiveRecord, Rails etc. A.K.A.: Magic

Here’s a definition for you:

Ruby is a compiled language in much the same way that Java is. While ruby is not compiled down to native machine code, it is compiled into a set of bytecode instructions that are interpreted by a virtual machine. In the case of Java the VM is JVM, in the case of Ruby it is YARV, which stands for “Yet another ruby virtual-machine”.
In order to compile your program, ruby recursively iterates over the nodes in the AST from the top down and compiles each node into corresponding YARV instructions.
Source: The Structure and Interpretation of Ruby Programs

Now, my initial thought to reading that definition is: “WTF does that even mean???” Then, “Bytecode instructions?”, “What’s a node?”, “AST???”. Despite acquiring the skills to do things like write an entire CLI app, manipulate data in a database using ORM, and create an interactive web app, I couldn’t tell you what’s really going on. I couldn’t tell you what exactly the computer is doing, how it’s processing the information, or how it knows to do what I’m telling it to do.

Ruby is high-level programming language that allows you to write code virtually in plain english. At a glance, that’s awesome. I was able to learn the language and begin producing programs in a relatively short amount of time. My problem is, I cannot just glance. I must stare. Inspect. Scrutinize. Before I had time to do that though, we kicked it up a level of abstraction. We started learning ActiveRecord. Before I knew it, we had kicked it up multiple levels of abstraction, using Rails as a framework for making dynamic websites. ActionView helpers. ActionController. Form_for. Form_with. Collection_select. All these terms, modules, methods, and classes predefined for me. Don’t get me wrong, though. I highly appreciate the work of those who came before me. Truly magical work. As a control freak with a need to understand why, though, it’s pretty stressful to accept that the sky is blue simply because the sky is blue.

Moreover, it’s become especially stressful to work within the constraints of all this predefined code. I consider myself a free spirit. I’ve never really been a planner. And I’ve definitely always marched to the beat of my own drum. But to perform magic, you have to cast a specific spell in a specific way. To experience the ease-of-use and magic of Rails and other like frameworks, you basically have to become a robot. Everything has to be done perfectly. Models have to be singular and inherit from ActiveRecord, controllers have to be plural and inherit from ApplicationController which inherits from ActionController, this or that view has to be in this or that subfolder, or else, BOOM, your spell blows up in your face and you’re left eyebrowless. If you want to debug, prepare yourself to spend hours staring at your screen not having the slightest clue what your error is telling you because the code has been so heavily abstracted and so many methods are being called from so many different files that you’ve never even seen. As magical as Rails and all it’s abstraction is, understand that you’ll spend plenty of time doing mundane, tedious debugging if you don’t follow all the boilerplate templates it expects and requires to function.

Conclusion

Despite my complaining, Ruby and Rails are definitely magical. Rails is the collective brain-child of people wayyyy smarter than me. Those smart people used to spend days on end just setting up the necessary low-level code required to deploy a web application. Thanks to them, we’re now able to do the exact same thing in hours, even minutes. MAGIC. But of course, if you’re like me, you need that low-level understanding for peace of mind. In that case, it’s entirely possible, through intensive, motivated self-inquiry, or through a traditional CS education track to acquire that knowledge. To learn how the magic happens. I’m not sure which path I’ll go down, but I defintely intend to achieve that level of mastery. For now, though, when I tell my technologically-dumbfounded family and friends “Here’s a web app I built using Ruby on Rails as a framework, a SQLite3 database to store my data, and embedded Ruby in HTML to render output in the browser”, for all intents and purposes, I am a powerful wizard.