We should teach our kids about APIs

By Cyrus Bahrassa  LinkedIn

Child in a pink shirt and gray vest holding a book with a look of surprise on his face, with overlayed text that says "Warning: APIs may cause great excitement in minors"

"Is this hacking?" he asked.

Taken aback by the question, I ad-libbed, "Well—not really, but it's a little like legal hacking."

"This is so cool," he replied.

That was a snippet of a conversation with a middle schooler, as I introduced him to the world of APIs. I volunteered this week at a public middle school here in Nashville; it was Family STEAM Night, and a variety of businesses were showcasing careers and opportunities in science, technology, engineering, the arts, and math. A little surprisingly, Ashavan was the only tech company in attendance, but that didn't make us the biggest draw. The gentleman at the adjacent table had a live snake the kids could pet; it's tough to compete against that.

Nonetheless, a good time was had. I was there to teach kids about APIs and how you can make a career out of getting totally different software systems to talk to one another. The demo was simplistic, a couple of API calls between Postman and Salesforce, but it resonated with the students. They had no idea apps on a phone or computer could exchange data back and forth.

Connecting to more kids

The experience made me realize that we should be exposing our children to APIs in K-12 schools. We've made strides in incorporating computer science into curriculum, with the Code.org Advocacy Coalition reporting that now over half of high schools in the US provide a computer science course. And 54% of the states require schools to offer computer science, with five of those (Arkansas, Nebraska, Nevada, South Carolina, and our home of Tennessee) implementing computer science courses as a high school graduation requirement.

Yet these courses focus heavily on hands-on-keyboard coding, and there's more to software and technology than simply building the tools. There's also design thinking, system architecture, and solutioning. There's security, performance, and data privacy. You can build a successful foundation of knowledge—and a well-paying career—without becoming an expert in a programming language.

APIs can be a powerful conduit for teaching all of these things. Now, granted, truly understanding APIs requires deep, high-level thinking skills that younger kids probably won't have developed yet. The K-12 Computer Science Framework, developed by Code.org and a few other organizations, appropriately reserves API concepts for high schoolers. And APIs aren't exactly flashy and exciting to most people; writing a Python script that causes a toy robot to turn and move feels more rewarding.

However, I believe APIs have a place within computer science curriculum, and we can and must do a better job of introducing them at an early age. We can do this by relating API concepts to the real world and demonstrating the practical effects that arise when software is interoperable. Here's one idea: have younger students roleplay as apps and data points. The "apps" could call out commands to send or retrieve data points, and those "data points" could run back and forth between the connected apps. But if an "app" gives an invalid command, no data will move. It's a simple way to demonstrate technical communication while incorporating some physical activity.

Mix in some magic

Despite studying education in college, I'm by no means an expert on the best approach here. We have educators who are better suited for baking APIs into school curricula than an interoperability nerd like me. But what I do know is that we should do it. APIs are magical things; they break down barriers and spur innovation. Let's expose our kids to that magic in the right way and at the right pace, and hopefully we'll bring greater understanding and a brighter future to a few more (legal) hackers.


Image by Ben White on Unsplash

Share this post

Subscribe to the blog

Get new post notifications in your inbox