Respect

Learn to Program, Third Edition — by Chris Pine (75 / 116)

The Pragmatic Programmers
The Pragmatic Programmers

--

👈 Random Internet Jokes | TOC | Trivia Database 👉

With the Official Joke API, you can get jokes for free. And because they’re all made up of bits that are easily copied, when you get a joke, you aren’t taking that joke away from someone else.

Except everything I just said is a lie.

First, it’s not free. It’s extremely cheap. Sure, it’s free for you, but someone, somewhere, is paying for the server that’s running the Official Joke API. Although requesting a single joke is extremely cheap, it’s also extremely easy to write a loop that fetches one billion jokes (or continuously fetches as many jokes as it can, forever). And someone would have to pay for that. If that got too expensive, then everyone would lose the Official Joke API.

Second, because of this, and because of the limits of how fast a server can serve up jokes, there actually is a finite number of jokes. If you request too many in too short a time, it could prevent some other program from fetching a joke.

Use free APIs respectfully. If you’re using a free API to make money, reach out to the creator to agree upon usage limits and compensation. Free APIs are a wonderful resource, and a gift to you from other awesome programmers. Maybe reach out and say thanks.

And only take what you need.

--

--

The Pragmatic Programmers
The Pragmatic Programmers

We create timely, practical books and learning resources on classic and cutting-edge topics to help you practice your craft and accelerate your career.