Like A Girl

Pushing the conversation on gender equality.

Code Like A Girl

What Do Array Methods, Amazon Web Services, and Top Gun All Have in Common?

They were all extremely picky today — is the answer — sorry for being clickbait-y. This morning I tried to set up an Amazon EC2 instance to host my portfolio and I followed this video with varying degrees of success.

When I followed along with the video it worked just like the dude’s did at first, but half an hour later I tried to ssh into the server again and kept receiving this sad response:

Sad!

I read through a few troubleshooting forums, and it seemed like people with the same error had issues with their security group settings — that some rule prevented ssh-ing because of their computer’s public IP address.

But I had the least secure security group ever (according to the video), and it still wasn’t letting me ssh in, so I’m thinking it could be a region thing — with the instance connected to US-east-2 instead of US-east-1 or something.

(If anyone knows more about this and is not evil and malicious, feel free to intervene and steer me to secure instance-y shores.)

Anyway, I wasn’t feeling too great about having spent most of the morning fiddling with AWS— especially when I could have spent that time working on our movie database API exercise, which has gone less than smoothly.

I started off with a few problems:

  1. I wasn’t using .map() properly — instead of providing a function to transform each element and return a new list, I was sort of treating map like the .forEach() method and only using it to iterate through movieDataList.
  2. Instead of accessing the keys inside object (which contained values like a movie’s title, genre, and poster) and turning those values into divs, I was turning the whole object into a text node…

Which ended up drawing out this mess:

Honestly it pains me to look at this, but I feel like I need to swallow my pride for the sake of the archive.

HOWEVER, just when I thought all was lost and I had no one to turn to but the free pizza at Civic Hack Night — there were actually really nice people to turn to at Civic Hack Night who knew what they were doing and helped remind me how array methods work:

Alternate comments: Reasonable! Normal!

I’m always amazed at how obvious my mistakes seem when I try to explain a function out loud. I know this is a common phenomenon, but still — it’s weird to think about the disconnect between thinking “inside your head” versus “externally” expressing something in a way to make sense for someone else.

Understanding that “rules mean this” and “this symbol means this and only this,” has been one of the hardest but also most enjoyable parts of learning to program so far. In politics and literature, I feel like there’s so much more wiggle-room around concepts and definitions — I’ve never had to think in this kind of abstract way so frequently.

I can also tell that over just the past six weeks, I’ve significantly improved my ability to troubleshoot my own code. I think part of this is just from asking for help so often. I was a little worried that asking for help so often would make me dependent on the instructors, but actually I feel like I’ve kind of learned their secrets.

Not like I’ve absorbed all of their knowledge and no longer need any help, but I’ve definitely picked up on the patterns of questions they ask to help debug. Not verbatim, but along the lines of:

What are you trying to make it do? What is it doing instead? Where in your code is that happening? If you’re not sure where, then try console.logging around to make sure you have the values that you think you have.

Anyway, I’m not at all finished with this Top Gun masterpiece, but I’m feeling a bit more confident about jQuery-free DOM manipulation and looking forward to our first group project.

(Also, the borders are for CSS troubleshooting, not trying to floor anyone with my aesthetic finesse just yet.)

B)