Sunday, May 17, 2015

Not Sure What It Is? Call It an API!

WARNING: RANT BELOW

As I began to dive into programming, I kept running into this term, "API." I quickly learned that it stood for "Application Programming Interface." This told me exactly nothing about what it actually did.

I have now concluded that an API is a catch-all. Anything can be an API -- any little chunk of code, codebase, web service, or more. As far as I can tell, the dictionary definition might as well be:

API -- A useful codeish thingie of any size.

As proof of this conclusion, I offer two exhibits. 1. AppNexus. 2. A sentence from developer.android.com.

Exhibit 1 : The AppNexus API

I recently attended a meetup at which the topic was just "The AppNexus API." Apparently, this API called AppNexus is a project that makes online advertisements better somehow. In other words, it's a huge codebase worth millions of dollars, with 6 or more teams working on it. And yes, it's called an API.


Exhibit 2 : This Sentence

"A drawable resource is a general concept for a graphic that can be drawn to the screen and which you can retrieve with APIs such as getDrawable(int) or apply to another XML [...]"
Wait. Did they just call "getDrawable(int)" an API? Like, the same word that was used to describe a multi-million dollar codebase/tool?

That's right. Apparently this method is an API.

Conclusion

I propose that the term "API" be replaced, in all instances, with hibberdefoo. Or perhaps glumbobber. It's the same number of syllables. It lends equivalent meaning to whatever description it's used within. In fact, it's probably MORE useful, since whoever hears the term can intuitively understand that it doesn't mean anything whatsoever.

#theEnd

Personal Update

I started my digital life on Nintendo and MS-DOS. I remember playing Reader Rabbit and Math Blaster on my parents' computer from a young age.

In middle school, I started playing more and more Xbox, and less and less Gamecube. Microsoft lured me in with the Halo franchise and its addictive multiplayer gameplay and matchmaking system. While in college, I would become one of the top 3 players in Colorado's competitive Halo community (see my Halo blog.)

This March, I sold my Xbox One after only three months of ownership. Finally, in April I've broken Bill Gates' stranglehold on my soul. Steve Jobs' replacement (whoever the hell it is) can have it instead.

I got a Mac. Yippee. The end.

Objects in JavaScript, Classes in Java

Coming from a Java background, it's easy to understand objects in Javascript.

A Javascript object with a constructor is like a class in Java.

Once you define an object with a constructor, it becomes like an object "type", or as a Java guy would say, a "class." Instances of this object/type/class may be instantiated with the "new" keyword, and their methods and properties can be accessed with dot notation.