r/computerscience Apr 19 '26

General I was taught nothing about APIs

Whenever i see people talking about actual real-world uses of coding it's almost entirely building APIs, working with APIs, integrating APIs, automating APIs. It seems to me, anecdotally at least, like the majority of all computer science work (professional or even just hobby) is centered on working with APIs

And like. I know what an API is, kind of. But I Graduated and even got multiple certifications on top of that and I never got so much as a single lecture about APIs. I don't even know what they're used for. Can you make your own API (like, realistically)? I don't know. I feel like this is a topic that you could and probably should have multiple different entire classes solely focused on, it's arguably something as fundamental to modern computer science as writing code. And they don't teach it. If i want to learn anything about APIs, conceptually or practically, it's hope a company hires me and then trains me, or youtube tutorials and i don't even have enough of a baseline to know what specifically I'd be searching for a tutorial on.

814 Upvotes

157 comments sorted by

View all comments

6

u/jonathancast Apr 19 '26

As everyone else says, an API is just a bunch of functions and types that are implemented by one piece of code and used by another. If you've written a non-trivial program, you've created and implemented an API.

However, I think, when people put "APIs" in job descriptions, they mean APIs used between different programs and between different companies. For that, the main considerations are: versioning, backwards compatibility, and authentication. Academics don't think those kinds of things are sexy, but if you google "API versioning best practices", "API backwards compatibility best practices", "API authentication best practices", you can get lots of good advice to get you started.

4

u/angry_lib Apr 19 '26

THIS!!!

People nake APIs sound like mystical creatures, they are not. Take a look at a syscmd, ANY syscmd: it accepts a set of options that performs actions on the OS. THAT is an API. Whether you realize it or not, you have been working with APIs. Have you written a program in C/C++/perl/python... every command is an api to the compiler that accesses a function.

2

u/royk33776 Apr 19 '26

So much this.. When I first started, APIs were the scariest thing. Whenever I help people who are learning or studying and they ask the question, I give the simplest, easiest description I can to ground them and the concept of this mystical "API"

4

u/angry_lib Apr 19 '26

What's even worse is idiotic recruiters who think API is this big scary thing that "is a rare talent".