Working With APIs & RSI

David Clark
L2Code
Published in
4 min readJun 5, 2018

What I’ve Learned, What’s Coming Up, and Dealing With Physical Pain

Photo by Me

Listening: Chvrches “Love is Dead”
Drinking: Colombia by William Joven, micro-lot coffee

This last week, per Thinkful’s curriculum, I started working with APIs. Namely, GitHub’s and YouTube’s APIs. I have to say — I really learned a lot here.

YouTube API

Working with the YouTube API has been… “great”. It’s been a bumpy road. It’s not as easy as just reading the docs and understanding what to do. I’m sure it is for more experienced developers, but for myself, it’s still quite the process. This is an instance of where I solved an issue I was having.

There I was, trying to figure out how to add the YouTube feature of displaying the total results returned from a search form submission (query). I knew where this data was in the YouTube API object (.pageInfo.totalResults), but was having trouble figuring out how to show it on the page. I had little trouble getting the search results to turn up, but for some reason or another, adding this element to my feature list threw me off.

I started working on this just before a mentor meeting, so I had to put it on pause once that started. Toward the end of our meeting, I remembered to ask my mentor about this. I started walking him through what I had already done, and before I knew it, I had fully coded the feature in, and it was 100% function. Hah!

This was my first time doing something like this, and let me tell you — it felt great! Finally, I had come across something I hadn’t done exactly the way I was doing it now, and I did it just fine! I can only assume that this is coming from a point of better understanding of programming.

View my YouTube API project here.
View it on with rawgit to interact with it here.

Functions

I think I’m getting more familiar with just how functions work. You’d think I would understand them by now, but they’re pretty tricky. Functions don’t just take one thing and do something with it — Depending on the function, it could do one thing, two things, one or two things, or a multitude of things. There’s also methods, which are built-in functions that have certain requirements and optional features.

Namely, I’m getting more comfortable creating callback functions, or calling a function within another function. Bouncing from line-to-line in code is new to me, so it can get pretty confusing at times. But the more I read other code, the more it makes sense. It’s definitely not easy right now, but my last project actually made lots of sense, and I solved most of my issues by stepping back and reading my code, or by Googling.

My Mentor

Also this week, I got a new mentor. I have to say that I’m pretty happy about this. My first mentor wasn’t great at motivating or explaining how things work. If I asked how this thing was performing what it was doing, they wouldn’t really explain it. Rather, they would say something ambiguous, or over my head, or say too fast, or more often than nought, say, “Well you don’t have to do it that way. You could do this.” It just wasn’t a good match for me.

My new mentor has ~20 years of experience and seems to be a bit more easy-going and willing to take things one step at a time.

Thinkful gives a new mentor when you… *drum roll* are admitted into the full-stack development portion of the program. The time leading up to that is really a focus on programming fundamentals. So, yes, I’m officially a student of front-end web development.

What’s Next?

The front-end portion is almost done. What?! It feels like I just started!

Next, I’m working on my front-end capstone, which includes working with an API of my choice, building a project of my choice. I think I know what I’m going to do, but I won’t post it here until I’ve completely made up my mind.

Pain. Lots of it.

Not the learning type of pain, but the physical pain. I purchased an external monitor, a laptop stand, a keyboard, and a mouse, so that I could be more productive. Having a second monitor is life-changing when it comes to writing code. I can have API docs pulled up on my laptop monitor, while my terminal and text editor are running on my external. It’s great!

Unfortunately, though, there have been some side-effects. My right fingers/hand/wrist/arm/shoulder have started experiencing some pretty intense pain from — what I can only assume — using a mouse. This is probably just RSI (repetitive stress injury) and not carpal tunnel syndrome, but I don’t take chances when it comes to my well-being. I’ve since stopped using the mouse and keyboard, and now have my laptop in front of me instead of to the side, and my external monitor just above my laptop. This doesn’t make for the ideal eye-height, but I’m waiting for my Magic TrackPad to arrive.

I think the external mouse is what was causing the pain. I tried a vertical mouse first, then returned it when the pain started. The traditional mouse was even worse. Since I’ve gone back to the laptop’s trackpad, the pain has almost entirely dissipated, and is now mostly just tingling at some times.

I think another contributing source is my desk height. While it’s at the standard 30.5 inches, I need it to be at 25 inches max in order to get a 90º angle at both my legs and my arms. I’ve been considering getting an adjustable-height desk, but I’ve only found a couple that get down to 25 inches, and they’re expensive! If you have any suggestions, please let me know!

--

--

David Clark
L2Code
Editor for

Mindfulness | Humans | Animals | Earth | Coding | IG: the.coffee.smith