Archives for the month of: May, 2014

This summer I’m taking part in the Outreach Program for Women, working on making the MediaWiki API more usable. As a part of this, I’ll be blogging every week or two with things I’ve done, things I’ve learned, or general thoughts as I get into the free/open source software world.

This is the second in a series on the MediaWiki API. Click here for previous post.

What is an API? “API” is short for Application Programming Interface, which is not much more informative. Broadly, APIs make it easy for programs to interact with each other–which is to say, they make it easy for programmers to incorporate a different program’s functionality into the program they’re writing.

This article on APIs by Brian Proffitt clearly describes the most important ways APIs work:

APIs… “[expose]” some of a program’s internal functions to the outside world in a limited fashion. That makes it possible for applications to share data and take actions on one another’s behalf without requiring developers to share all of their software’s code. Code-sharing on that scale wouldn’t just ruffle the feathers of programmers who’d rather keep it secret; it would also be grossly inefficient.

That’s true even for open-source programs. Who has the time to comb through all the code for somebody else’s application—which, trust me, can be awfully messy—just to use one function? (It’s also possible to run into tricky licensing issues if you’re not careful.)

APIs simplify all that by limiting outside program access to a specific set of features—often enough, requests for data of one sort or another. Feel free to think of them as doors, windows or levers if you like. Whatever the metaphor, APIs clearly define exactly how a program will interact with the rest of the software world—saving time, resources and potentially nasty legal entanglements along the way.

That’s the general concept behind APIs. Web APIs are similar, but made for the internet: they’re a way to fetch data from the database behind a website.

When you use a web browser to go to a website, your web browser makes an HTTP request to the server the page is stored on. The server, in turn, sends you data in the form of a web page: information in text/video/graphical form, arranged so that humans can easily understand it. You are now free to read the article/look at kitten pictures/write and post your blog post/watch that awesome fanvid.

When you write a program that uses a web API to fetch data from a website, your program makes a carefully-constructed HTTP request to the server the site is stored on. The server, in turn, sends you data in a format your program expects (if you asked for data) or incorporates your changes to the website (if you sent data). Your program now has a tasty chunk of data to use and you can use it to make diagrams/search for specific items/look at a user’s history/edit that wiki page/automatically bookmark those “to-watch” fanvids.

That’s it. A web API is just another way of exchanging information with a website. This web API description on Wikipedia is still full of acronyms… but it might make more sense now.

In the next post I’ll talk about how you can figure out how to make requests from an unfamiliar API.

Advertisements

This summer I’m taking part in the Outreach Program for Women, working on making the MediaWiki API more usable. As a part of this, I’ll be blogging every week or two with things I’ve done, things I’ve learned, or general thoughts as I get into the free/open source software world.

When my mentor mentioned that she had a project that could use an intern, I was not 100% clear on what an API (Application Programming Interface) was. I knew it had something to do with another way to interact with websites without actually having to visit the relevant webpages, but I’d never given it much thought.

I was interested, though. I went off for some quality research time and about ten days later I’d finished the project proposal for my OPW application.

Don’t believe anyone who tells you learning to code is easy…

…and don’t believe anyone who tells you that APIsespecially MediaWiki’sare intuitive.

As I gear up for WikiConference2014 next weekend, I’ll post resources I found helpful and tips for getting started yourself.

I wrote about the ways toxic entitlement enables unintentional but substantial harm in STEM communities for Model View Culture’s current issue, Abuse.

When “I Didn’t Mean To” Makes it Worse

Entitlement and violation in STEM communities

We assume that our stories are universal. We assume that what helps us will help others. We ask, “Couldn’t you just…?” and explain that, actually, if they saw things our way they’d have it better. We ignore differences of ability, power, class, and culture to overwrite their stories with ours. We expect the world to be as we want it, and when we have power we act like that’s true.

That is the danger of entitlement. When we expect more than we’re due, we are in danger of robbing those around us of their own autonomy. Our assumptions shape our actions. Unintentional harm becomes easy. When we don’t expect boundaries to exist, we step right past them without looking, all in what we think is good will.

We don’t want to do this. How do we stop?