APIs, not apps: What the future will be like when everyone can code

No readers like this yet.
code.org keynote address

Opensource.com

A couple of decades ago, if you spent every day in chat rooms with your friends, you were a nerd. Today if you do the same thing, you're just the average Facebook user. And so it's no surprise there's a gold rush mentality in the learn-to-code movement. With the tech industry booming and its products so pervasive in our lives, the allure of six-figure tech salaries make plenty of people pack up and head West (literally).

And just like in the gold rush of the 19th century, there are plenty of people looking to get rich not by mining, but from outfitting the miners. Coding academy websites, boot camps, and tech book authors (such as myself) all offer the means to obtain these coding skills. I think some of these groups push the promise of dotcom riches from their products more than they should. In obtaining the "literacy of the 21st century", there's plenty of hype to go around.

Despite this hype, I do think that coding will become a more widespread and routine skill in the years to come. Programmable technology will continue to pervade more parts of our life, computers will continue to become more accessible to a wider population, and the world will continue to become more complex. Understanding coding (and debugging) will naturally go with it.

I believe it so much that I quit my software developer job to write programming tutorials full-time. My latest book, Automate the Boring Stuff with Python (No Starch Press), is released under a Creative Commons license and free to read in full at automatetheboringstuff.com. The approach I take with this book is one that focuses on writing small, practical scripts to automate tasks on your laptop or desktop PC. All the basic programming concepts are covered for people with no experience, and the computer science is skipped.

Being code literate doesn't mean understanding the details of sorting algorithms or object-oriented design patterns. The tasks that coding can help with are the ones that a typical office worker would be faced with:

  • Reading through a large amount of PDFs, Word documents, or other files looking for particular information. (Chapter 13)
  • Programmatically updating the Excel spreadsheets that many offices use to organize their data. (Chapter 12)
  • Organizing folders on your hard drive by copying, renaming, moving, or deleting files. (Chapter 9)
  • Web scraping to grab information from the Internet as it's updated. (Chapter 11 )
  • Sending out automated emails or text messages notifications to free you from having to check in on your computer yourself. (Chapter 16)
  • Basic debugging skills to figure out how to fix your code. (Chapter 10)

These are areas where non-programmers can significantly boost their productivity by learning to code. This is different from everyone becoming a software engineer. When I say learn to code, I don't mean develop software professionally. Almost every adult has a driver's license, but only a minority are cab drivers or NASCAR racers.

Will this influx of amateur programmers drive down the demand—and salaries—of developers? I doubt it. The same arguments were made in the past about open source software. Won't having a free operating system like Linux destroy jobs? Won't having a free web server like Apache destroy jobs? Won't open source implementations of Python, Ruby, PHP, Perl, and JavaScript destroy jobs? None of that happened. In fact, quite the opposite: The availability of open source software has created an avalanche of opportunities for the tech industry. So will coding-capable consumers.

Coding as a life skill

Jeff Atwood wrote an article in 2012 on his Coding Horror blog, Please Don't Learn to Code, in which he laments the "everyone should learn to code" movement. In his mind, programming should be left to the professionals because more code in the world just means more buggy code. I can't disagree more. This is like saying there should be fewer literate people because more writing will result in more misspelled words. Unlike Jeff, I do equate coding as a life skill like reading, writing, and math—if not now, then in the future. Jeff's piece isn't quite making the argument that I was into coding before it was cool, but he is adamant that universal coding literacy would be a net negative.

I admit, from the vantage point of the start of the 21st century, achieving universal programming ability seems as ridiculous as achieving universal literacy did at the start of the 20th century. But today, even in developing countries, it's more common to be literate than not.

What I think critics don't consider is how universal programming skill will change culture. More programmers doesn't just mean more apps in app stores or clones of existing websites. Universal coding literacy doesn't increase the supply of web services so much as increase the sophistication in how web services are used. Programming—by which I mean being able to direct a computer to access data, organize it, and then make decisions based on it— will open up not only a popular ability to make more of online services, but also to demand more.

Almost every major website has an Application Program Interface (API), a formal specification for software to retrieve data and make requests similar to human-directed browsers. Facebook, Wikipedia, Amazon, Twitter, Google, and Reddit all offer APIs so that their users can automate their interactions with the site. The vast majority of users don't use these APIs—or even  know what an API is—because programming is something that they've left to the professionals. But when coding becomes universal, so will the expectation that websites become accessible to more than just browsers.

APIs, not apps

This is a world that demands APIs, not apps. Being limited to the app store's selection will be insufficient. Not everyone will be making their own Facebook app, but everyone will have their own individual needs of Facebook's database and services. Simply taking what the Facebook website delivers will not be enough. Users will want to make use of web services on their terms, in their own programs.

And if I've learned anything from my readers, it's not as hard to achieve as most people think.

The APIs-Not-Apps future is a natural extension of the open source movement. Programming is not just writing software from scratch or forking existing projects. Many users have nice-to-have ideas for features that would benefit their individual workflow, but are too niche to be considered. Making a programmatic interface for software a common expectation opens a lot of possibilities. A form of this exists now, although the access that APIs provide is often incomplete and burdened under license agreements. This is far from the open source ethos.

Like most things when it comes to our species, this problem is more political than technical. Right now corporations and governments are keen on limiting the power of computers, not expanding it. There's simply too much incentive to maintain these walled gardens, and consumers aren't demanding the walls be torn down. As Cory Doctorow writes, there is war on general-purpose computing, and its aim is to restrict all computers through DRM, spyware, and patent abuse. With the Supreme Court recently refusing to step in on the Oracle v. Google case, even APIs themselves can now be locked away under copyright.

A universal code-literate future isn't impossible, but we have to choose it, as a society. Learning to code isn't simply a hobby or a productivity boost, but a path to becoming a more engaged and capable adult.

Back to
School

This article is part of the Back to School series, focused on open source projects and tools for students of all levels.

User profile image.
Al Sweigart is a software developer and tech book author in San Francisco. He has written several Python books, which are available under a Creative Commons license at https://inventwithpython.com

8 Comments

I love your article. It's a manifesto that needs to be shared far and wide. You have articulately provided a cogent reason for everyone to learn to code. I've already shared this with ed tech colleagues on Twitter. I also want to thank you for writing "Automate the Boring Stuff with Python," which I am in the process of reading now. I bought the book last week in a Barnes & Noble store and later discovered that you had provided the text and wonderful YouTube videos on the internet with a Creative Commons license. Bravo! I decided to donate the book I bought to the local library and to work on your course online. :)

In his mind, programming should be left to the professionals because more code in the world just means more buggy code. I can't disagree more. This is like saying there should be fewer literate people because more writing will result in more misspelled words.

That's a mic drop right there.

Good article and I agree with your words Al Sweigart

Nice piece.I think there there is a future with Coding than just API's

A universal code-literate, I like that. Intuitive user interfaces, e.g. touch, gesture, 3D can also increase people's interests towards coding. And APIs not only makes coding interesting to all kind of people but It can also nurture new kind of business on top of the open source. Thanks a lot for the very interesting article and thoughts!

Great read. I think it was one of the analyst firms who said we're in the golden age of APIs not long ago, but I'd also reconsider requiring coding skills for the more mundane tasks such as programming spreadsheets. The more digital-savvy workers of today have begun using low code platforms like Quickbase, Mendix and Outsystems for those sorts of things developers or IT guys would be happy to get off their backlogs.

This is a nice article! Your thoughts and words make sense with the coming era of IOT devices, where every one coming up with the solutions for the problems only they will be able to understand better and solve. Always been a huge fan of your work. Haven't got the chance to read your new book. Will give it a shot.

Hi, author here. I just found that this article was posted to Slashdot back in September. A lot of those comments seemed similar to the kind I saw on Reddit: universally dismissive of the articles premise. Which would be a learning experience but I saw again and again the commenters were referring to things they assumed the article said rather than what the article does say. (Like, I can copy and paste exact sentences from the article.)

So to clarify these misconceptions, let me just go through a few of the more popular critiques:

* "Everyone won't become software engineers."
I agree, and say exactly this in the article.

* "Popular programming won't replace software engineers."
I agree, and say exactly this in the article.

* "Programming is beyond most people's ability."
I disagree, and the same would have been said hundreds of years ago about literacy. If anything, programming easier today than it was in, say, the 80s. Computer science will always be hard; writing small scripts to automate tasks is easy and becoming easier.

Take a typical office worker thing like email: You don't have to be a computer scientist to set up Outlook email rules. They're a series of "if the sender is this and it contains the word foo, mark it as read and put it in this folder". Extend this (incredibly helpful) feature to other applications and web services. It's not writing a 10,000 line app with complex data structures. It's an incredibly useful way to specifically configure the application.

* "People would rather just buy a $5 app than write their own app."
I agree, and I don't claim that the average person will write their own Facebook app. But individuals will have their own needs and workflows _on top of_ their Facebook app, or their email client, or their spreadsheet program. "The app already does this, I just want it to do that with this other thing." These last-mile features are too insignificant of a market for professionals to make, but significant enough to that one user for them to cobble together a script for.

* "Everyone has cars but aren't mechanics."
Moving from the state of "broken" to "working" is different, and much narrower, than wanting to configure a computer to do some custom action. And this massive range of possible configuration is what makes a computer different from an appliance like a car or refrigerator or skills like wiring a house. If computers didn't have this large, flexible potential of use, then computers would be no different from cars and only a few "mechanics" would be needed.

I'll have to add a post-publication clarification: when I said in the article that people will learn to debug, I mean that they will debug their own code. Not that they'll be debugging code written by others or submitting pull requests for professional software.

* "Amateur programmers will write terrible, buggy code with security vulnerabilities."
Snarky reply: So it'll be the same as professionally written code, then.
Sincere reply: The programs they write will be of much smaller scope. Most often these will be limited scripts that automate simple tasks, not control nuclear reactors.

* "Amateurs will write inelegant code that is impossible to maintain. They start small, but then the company becomes dependent on it and then eventually has to spend tons of money to replace it."
Snarky reply: So it'll be the same as professionally written code, then.
Sincere reply: Good. There was obviously a need for that shoddily-written script and it was an improvement on what was there before. And if it wasn't worth the cost of replacing, then the company simply wouldn't replace it. But that shoddy code is what grew the company and made these growing pains possible in the first place. If that's terrible, you might as well argue that we should have never developed agriculture because it led to modern day problems.

* "In the 70s if you owned a computer you had to write code for it. But computers are becoming more like appliances and won't need to be programmed."
Programming is much easier and computers are much more relevant to culture now than they were in the past. This makes it possible to have programming as a casual skill rather than a job-related specialization or only for hardcore hobbyists. Meanwhile, because of the internet, there's a lot more you can do with a computer now than decades ago. Also, see my "last-mile" bit above.

* "We tried this already with Visual Basic and COM. They didn't take off."
One, this was in the 90s before the internet made computers relevant to mainstream users as a social tool and Google made it easier to learn about these tools. Two, HTTP is far more universal setup for APIs than Microsoft-only COM (or other API schemes) ever was. I don't know what future programming languages and protocols will look like, but I know they'll be more relevant and usable than the ones we have today, not less. Otherwise we wouldn't have switched to them.

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.