Monday, May 29, 2017

Hackbright Week 8: A Decision to Trust My Instinct

I come from the world of marketing, and in the world of marketing, you can oftentimes fake it 'til you make it, which more or less means faking answers 'til you find the right one later to correct yourself. Things change so fast in the world of marketing that trends, platforms, and solutions come and go just like that, and you're expected to adopt to new things and are able to forget old ones if they become irrelevant.

In the world of learning how to code, for me at least, this is not really the case. If you have the wrong syntax, your code will break. You have the wrong logic? Your code will will break, maybe not immediately but eventually. Oftentimes when you are stuck, that's all you are going to be for a while. You can't really fake it 'til you make it, unless you stick a placeholder "pass" statement in your Python function to come back to later. It's important to have a strong foundation and knowledge from the beginning to avoid a lot of frustration. Not to say you can't be corrected or learn new things because you can totally go on Stack Overflow and find a million solutions to one problem, but I tend to absorb everything our instructors and TAs say like a sponge, and I find it sometimes quite a feat to be corrected in one thing once it's settled into my brain.

"Where are you going with this?" you may ask.

Well, on Week 8, our cohort manager Leslie announced that they will be opening up a TA position for students to apply to, as they always do for all cohorts. When I first heard about it, my instinct was immediately to think, "Nah" because as appealing as it sounded to be able to re-learn the material while getting paid to do it and also be able to interact with the awesome staff in a different level, I don't have any formal experience in teaching and didn't want to stray from my goals of finding a software engineering job as soon as possible after the program.

Two days later, my advisor came over to check up on the progress of my project and encouraged me to apply for the TA position. Moved by his vote of confidence, I agreed to give the interview a shot. However, two days went by and I started to panic. Call it imposter syndrome all you want, but I felt I would not be able to overcome the fear of imparting coding wisdom on future Hackbright students without getting real world software programming experience first. In other words, I didn't feel like I could or wanted to fake it 'til I make it as a TA, especially when there are other students' learning involved and at stake.

I struggled for a few days with my decision to opt out the interview process and focus on my own learning, but was later super relieved and happy to find out that Hackbright could not have made a better decision to choose the cohortmate that I'm sure everyone thought was the best choice to be a TA. If anyone was up for the job, it's definitely her! She's awesome, smart, funny, friendly, and has tons of teaching experience. Whoever she is advising and TA-ing in the next cohort can consider themselves a lucky bunch!

I took it as a sign that trusting my own instincts was right, and that everyone will end up where they need to be!

Monday, May 22, 2017

Hackbright Week 7: The Power of "This"



When I think about my current state--the state of being at Hackbright, where my main job is to learn--I'm sometimes caught off guard at how much we are all living in the now, the present, this moment. If we weren't, we wouldn't have quit our jobs and previous lives, given up a good part of our social lives, and forked over a fortune of money with the chance of having these sacrifices drag on for another good couple of months afterwards while we're job hunting if it weren't for "this".

Today, in modern meme times, when you hear someone say something that resonates exactly with how you feel, it's not uncommon to say "This" while expressing some kind of way of pointing to the message, like via a carrot or physically pointing with a finger. More accurately, according to Know Your Meme:

^This is a single-word demonstrative pronoun used on message boards and social networking sites to show agreement with quoted or reblogged posts. Besides its usage as a single-word text post or tag, the term can also be found in image macros and reaction GIFs in which subjects are shown pointing upwards.

In the world of programming--Javascript to be exact--the concept of "this" is also something to be revered with high regard if you want to keep up with your code. I'll admit, I'm [only] 26 but honestly I refused to acknowledge the importance of memes until I realized they were going to stick around for a while so dammit I needed to at least keep up with the times to retain my youth. Anyway, same goes with AJAX requests. The first time we were introduced to them, I was like huh, these are cool but I think I'll stick with my handy, trusty form submissions. 

Of course "this" way of thinking is most likely the reason why until I struggled (and am currently still struggling with) converting a lot of my code into seamless AJAX post requests, now that I realize how critical they are to making my user flow work. 

Our TA said that as an inside joke, the ed staff would assign "this" to a variable named "that"

What happens in AJAX requests is that you are basically putting a stop/hitting a pause on a standard behavior of an element (e.g., the submit button of a form), intercepting the request to customize what you want to send to your server, and making your program report back to you on what happened via a success function. So you are getting stuff done in the backend and changing things on a web page dynamically without needing to make it refresh a million times.

Cool, huh? It sure is, but only after you've been exposed to "this". So when you click on a button to put a pause on its action, how does your app know which button you are stopping? "This" was the easiest answer that one of our TAs told me to use, and boy was she right! If you have a class of buttons that would behave the same way when clicked, the one you click on now becomes "this", and you can perform various actions on "this"and its parent(s), sibling(s), innerText, innerHTML, etc.

What magic, what fun, what happy discoveries! This is what I'm doing now and this is what I will be doing for a living. This is what makes learning about code so great. 

This.


Sunday, May 14, 2017

Hackbright Weeks 5 & 6: Codepiphanies and Scotch Tape Solutions?

So we're halfway through Hackbright and it still feels surreal, but maybe because everything is happening so damn fast that my brain is having a hard time just trying to catch up to the realization that, "Oh yeah, wasn't it two years ago this time that I discovered Hackbright by inputting the search query 'all women's coding bootcamp' into Google and happening upon what I thought could only be a dream come true?" Fast forward two years and here I am working on my project--MY project! Who could have foreseen this? Karen from two years ago certainly did not dare to dwell too much on this imagination that is now a reality.

WEEK 5:
Anyway, so I've been trying to rack my brain on any deep insights I received on Week 5, and yes I did learn so much so fast as always, but I think it really just boiled down to two things:

1. Now that we have completed our first week of projects, boy am I damn glad we had that 4-day long pair programming exercise building a movie ratings app from start to finish. It really did give a strong backbone template to my project's data model structure and solidify my knowledge in where to even just begin.

2. I am so glad that afternoon lectures have more morphed into project time. Not just because we really do need those extra hours for working on our project because working at night at home is exponentially harder, but because I was really starting to feel the fatigue break through in the afternoon lectures. I struggled hard on two to three occasions to stay awake during afternoon lectures on Week 5 and got really frustrated at myself for it. My body and mind are just at two different paces, and the gap really started to widen on Week 5.

WEEK 6:
So thoughts on our first week of project time:
You know when your parents tell you something and you don't really believe them until it happens and you realize that they've been around longer and of course they have more wisdom so you think to yourself, "Why didn't I just believe them in the first place"?

Well yes, this is exactly what happened when I realized our cohort manager Leslie was right to tell us that everything you think will take a long time for your project most likely will not, and everything you think will be a piece of cake most likely will not. I don't know if it's a bad thing because either way you win some and you also lose some.

So in my case, here was what I thought would take a long time: 1. data modeling 2. creating requests to the Spoonacular API.

My initial data model was not hard to create, but it did go through several modifications in which every time a schema of a table is changed and I have to: drop my database, recreate the database, recreate the tables, create a dummy login account, add data to this dummy account............and my feelings can be aptly summed up by the lovely Ali Wong:

Creating requests on the other hand, was done in just a pinch. I thought it would take me ages to fill in the key-value pairs of a GET request but as it turns out the Python requests library had me going like:

Who knew making requests could be this easy? Now, I know this is because the Spoonacular API is all nicely laid out and some of my cohortmates definitely did not have this experience with getting their data, so I got really lucky with what my project needed in terms of data and the available options of APIs that would cater to my project.

On the other spectrum of things, what I thought would be easy, however, sadly was anything but. On the second day of projects I made my first successfully GET request and had to do everything in my power not to scream with joy at seeing the JSON file print in my terminal. I thought this was it! But noo, the joy was fleeting. Not soon after I was making these requests and getting responses was I elbows deep in sorting through deeply, deeply nested data. Dictionaries nested in lists nested in dictionaries nested in lists nested in youknowhowitgoes. Again, not an entirely unsolvable problem, just tedious.

So when I was finally able to parse into the nests and retrieve what I needed, I came to the realization that my "be all end all" endpoint was not doing its job correctly. To give some context, in a nutshell my app is about finding recipes. Recipes have ingredients. You can tell by the title of some recipes the immediate ingredients you will need. For example, a Grilled Steak with Mushrooms and Gravy will no doubt have steak and mushrooms as key ingredients. It will never, for instance, only require garlic as its one and only ingredient, which is what the Spoonacular data, and hence, my app was returning.

I was almost at the brink of being all, "Screw this!" and telling the world, this data is telling you that you can cook a steak with mushroom meal with just garlic?! Then WHY YES, THAT IS WHAT YOU WILL HAVE TO DO BECAUSE DATA DON'T LIE. But then the logical, chef-y side of me decided to wade through the kitchen fire and test out another endpoint in the API to see what it can get me. 

Long story short, I found a roundabout solution to my problem, was able to recycle at least a good chunk of my first nested-data-retrieval code for this second endpoint, and all is good in the world for now.....until I break my code once again by trying to add more features and fix more bugs.

Sometimes, I feel like I'm just slapping a scotch tape on my broken code as a [temporary] solution to see if it will stick. I'm not sure if what I've fixed will dismantle and come to haunt me later down the road or if it's even a conventional way to solve an annoying bug. Only time (and my mentors) will tell.

Here we go.

Tuesday, May 2, 2017

Hackbright Week 4: Revelations of a Different Kind of "Click"

If there's one thing that has stayed constant in all the studying I've done throughout my years of education (elementary school, middle school, high school, and college), it's the inexplicable ability to retain the most information while in the most random and transient places to be studying--on a moving bus, in the dining hall, in between classes, you name it.

Last week, we were introduced to SQL, and I'm not gonna lie, at first I thought it was pretty straightforward and easy because of how simple its syntax is. However, once we were introduced its connection to Python, I felt not only overwhelmed but also really inept among my peers who appeared to be zipping through the lab exercises like they were nothing.

Feeling frustrated with myself, I started studying on my commute to class the next day. And lo and behold, when my partner and I continued our SQL pair programming exercise, I was suddenly able to rattle off the solution without thinking. As I studied our code during lunch, I was actually surprised at my own code...can you believe it? I couldn't! It's like the solution came out from a part of my brain that I didn't even know existed. It was a miraculous realization and a glimmer of hope that maybe, just maybe, I wasn't completely lost just yet.

Now, I'm not saying that everything just suddenly "clicked". This is not a fairytale and I did not just suddenly transform into a software engineer after studying on a bus (I wish!). As I've mentioned before, I'm surrounded by so many smart women around me every day. I'm not gonna lie, it's a little intimidating and disheartening at times to almost hear the gears click in their heads during lecture and ask intelligent questions, or see the lightbulb go off as they fire away code at their keyboards during lab and ask for a final code review well before the end of the day.

Why can't the gears in my head click this way? I don't know, but what I've realized is that maybe they don't need to. I often worry that if something doesn't "click" right away, maybe it never will. But what I've come to realize is that it don't need to click within the first hour, day, or even night. The lightbulb, gear, or whatever little machine is in my head is working hard, and its time will come.

The little nuggets of powerful information I can collect little by little each day can and will be enough, and will able to work together to drive that wheel of ambition one step closer to its destination.