trinket-blog/articles/Learning to Code.md

59 lines
7.2 KiB
Markdown
Raw Normal View History

2023-10-15 18:43:08 +00:00
> Everyone has a different journey for how they were inspired to become a programmer.
You know, when I decided to sit down and learn to code it was because I had just played a video game called [Thehttps://thepathless.com/ Pathless](https://thepathless.com). The Pathless* touched my soul in a way that was new to me. Something about the story, visuals, and my part in all of it really made me feel something new-- _inspiration_.
I promptly decided I was going to be a AAA game developer. Imagine that, a 13 year old kid wasting a road trip on a video game and finding his life inspiration on a car the trip across a few states.
I promptly sat down in front of a 2012 MacBook Pro (the only computer available to me at the time) and googled *"How to make video games"*. Well that was my first internet rabbit hole, I kept seeing terms like *Game Engine*, *3D design and animation*, and the most daunting of all; *Programming*. I was determined though, and a patchy vocabulary was not going to be the end of my moment of inspiration. I made a list of all the terms I didn't know and googled them separately.
After a night of internetting I went to sleep excited. I still didn't know what a *game engine* was, but I certainly felt like I'd made progress.
Bright and early the next day I began to research game engines until I felt like I understood what they were; I was pretty sure a game engine was the thing that took my idea for a game, and all my art and instructions on how it should run and made it into code for me. Perfect! I didn't really know how to code and I was fine with that.
I downloaded Unity and got to work. ..For about 10 minutes and then I realized that this was not a software I could just fat fingers my way through and make sense of. Well reader, I called it quits then. I decided game design maybe just wasn't my thing and to study on more realistic goals for a 13yr-old.
A few years passed, recently I has gotten back into writing and story creation-- i.e. I played a lot of DnD. I had been writing a lot of movie script-style short stories and really enjoying it, so I decided to start looking at cinematography. I had a Canon camera, so I did a lot of photography, I figured it would be a simple enough endeavor to start make short films.
That failed. I just couldn't invest the time and effort to create something I was satisfied with, not to mention my continuous failure to meet my own standards just made me push myself away from that niche. Well, I thought, aren't animated movies a thing? Can I make short films on a computer? According to google, I could! I wasted no time redownloading Unity because the word *cinemachine* was too cool not to figure out how to use it. Well, history may not repeat, but it sure does rhyme. I found myself in the same predicament of not knowing how to make the application do what I wanted it to do. I gave up on Unity again, but my desire to create a game had grown again.
I had recently played some games by [Appsir Games**](https://www.appsirgames.com), and I remembered seeing somewhere that they used a game engine called Buildbox. Well, I looked it up and learned all about no-code-tools. History rhymes like a motherfucker and so the download, open, have-no-idea-what-I'm-doing cycle repeated.
This time however, I stuck it through and watched some videos. Not much, I build a little driving obstacle-course simulator and sent it to my gamer friend as an unsigned EXE (The next 20 minutes were a frantic Discord call of me pleading with him to open it, and him saying his PC was saying it was untrusted).
That one simple experience turned into more complex game projects until finally, it happened. I ran into a problem I couldn't fix with nodes. I found a snippet of code on some forums somewhere on the internet and it worked, so I kept working on my new game project.
Something kept nagging me though; amidst all these nodes and networks, there was a little snippet of code making it all work *and I had no idea how*. This bothered me more than I expected so I sat down and began reading the 20 lines or so. I read them again and again, and looked up the words I didn't know until I did.
It worked, and I began to understand what I was reading, and it was *fascinating*. These twenty lines of code were doing things I would have spent hours dragging nodes to achieve.
I was set, it was time to learn to code, and nothing could stop me now.
I took my mom's 2014 MacBook Air that she'd just gotten for college and downloaded the Swift Playgrounds app.
The following month, I spent most nights dragging little blocks and snippets of code to solve the puzzles presented to me.
I didn't learn how to code from that app, but it did teach me what if statements are, what a function is, and most importantly, it imprinted DRY into me as my first experience of code design.
Once I finished with Swift Playgrounds, I wanted to do something big. Make an app, a video game, *something*. But the problem was, I knew what my code should do and how, I just had no idea what to actually type.
In that same area of time, was my first month of freshman year in highschool. We had an assignment to pick a dream of ours and see how close we could get to realizing it in a month.
I told them I wanted to make a text-adventure game like [Zork](https://wikipedia.org/wiki/Zork) (which I absolutely loved, but had never actually beaten).
The school issued me an old MacBook (they were everywhere when I was a kid), and I got to work. First, I had to find some way to teach myself code. I figured YouTube was a great place to start only the school had most content streaming platforms blocked on the network. I actually managed to find an old archive of this guy explaining the fundamentals of C# that wasn't blocked so I decided my game would be written in C#.
I spent about a month watching about 2 hours of lecture a day + coding along,
and by the end of it, I had done it! I had a C# text-adventure game! It only had 5 choices, and no real ending, and sometimes it just broke, but still! I had done it!
That rush of dopamine, the satisfaction of a (semi)working program was all it took to fall down the rabbit hole.
I asked my family for a Codecademy subscription for Christmas and took their Python course. Then, I took their HTML and CSS course. Then their JS course and you get it. I ate it all up trying to get as much knowledge as possible continuously.
That cycle repeated until I fell into tutorial hell. The way I got out of that was by getting programming books, actually. My dad got me a book about the command line from NoStarchPress***, and it taught me so much.
Now, I've progressed much in my quest for knowledge, but I often feel like I'm walking up the infinite spiral staircase from the Phantom Tollbooth, always moving, always learning, and yet no closer to the end at all.
---
> \* A genuinely amazing game, check it out if you have time. About 4 hours to beat normally, about 12 hours worth of content and open-world exploration if you want to 100% the game.
> \** An incredible indie developer who spits out some of the only platformer adventure games I've had the patience to play through (in fact I've played most of their games more than a few times. It's a monthly ritual for me).
> \*** Any book from NoStarchPress will teach anyone tons, I never get bored of their stuff.