The famous Hello World is often pulled into discussion when “Zero to Hero” is mentioned. The latter is roughly that the 3rd party developer starts from scratch with your API and you are interested about the timespan between start and being somewhat productive. In short you are measuring the duration of Time To First Hello World. I started to wonder how “hello world” is understood in contemporary service and application development.
The saying “Zero to Hero” is vague as you can see. It’s not accurate but let it be. You get the idea anyway. Why would you even think about concepts like hello world? It’s all about measuring (woooaa!) your API’s Developer eXperience level. You should have more measures (more accurate) but this is one way to test if your onboarding and the overall process for 3rd party developer works. Besides getting pretty basic stuff done with your API should not take too much effort or time .
Origin of Hello World
Hello world is said to be originally like this:
main( ) {
printf("hello, world\n");
}
Origin of the hello world is believed to have begun with Brian Kernigham’s 1972 book, “A Tutorial Introduction to the Language B”. Some claim that the roots are in intermal memorandum written in Bell Laboratories by Brian Kernighan 1974. The Hello World example has been claimed to become better known because of a book The C Programming Language from 70s. We can conclude that the origin is in some of the writings in ancient ICT history.
Enough history now. The idea behind the example is to illustrate the basic syntax of a programming language. Applying that to APIs and the world wee live now. You probably don’t want to build or provide examples which replicate the idea literally:
GET /print?w=Hello,%20world
Yuck! The above REST API GET example is horrible in many ways. I did not bother to make POST example…
Fast forward from 70s to contemporary APIs
I define the "hello world" with APIs to exemplify using a simple (if not simplest) basic operation successfully.
Time to First Hello World is then the timespan to get that done. Before you can make a call to API, you normally need API key or apply authentication (Token) or alike. Before you get the token, you need to register as a user. Then you need to find the documentation or guide/example. In short there’s plenty of steps before the consumer actually gets to write the hello world with your API in command-line or otherwise. In short “Hello World” is testing your API’s onboarding process. The duration of onboarding is not irrelevant.
2017 I wrote a post with title “You have 3 minutes to cross the chasm and get paying customers to your API” and it has been my most popular post in Medium ( I ditched Medium long time ago though because they act like dicks). In the post I had an image which described the 3-30-3 rule I borrowed from web visitor performance tracking.
3–30–3 rule applied to APIs:
- Great! Your potential customer has found (discovery) your API. If they stay for 3 seconds, you have gained developer’s attention. Keep in mid that we live in attention economy. In other words your API’s title is descriptive enough. You have crossed the first barrier sub-chasm.
- If they access your API endpoint and are able to test run API in 30 seconds, they are getting hooked, and are interested in your product or service. Even better.
- If they are able to find copy-paste code examples and use those in own code in 3 minutes, you have prospect paying customer and you have engaged them and are likely to convert them to a paying customer.
I can still agree with the idea after couple of years :) Ok, so hello world testing is a tool to test your onboarding process and customer path. Offering static examples is kind of getting old already. You need to have dynamic hello world.
Executable hello world as a service
It’s no surprise why Stripe has added runkit examples in frontpage. Stripe does not use APIs directly in the example but their library. I’m not going to add yet another screenshot of the same Stripe example here too. We have all seen that enough. That is one way to accomplish Zero to Hero in matter of seconds or minutes. Is the Stripes example a true “hello world” can be disputed, but to me it is. The hello worlds with APIs are not that fixed format-wise as they are with programming languages.
Even Express framework uses runkit to provide executable “hello world” in a page which has title “Hello world example”. For Express the hello world is “the simplest Express app you can create”.
As you can see it has nothing to do with the original C language example format.
I did some testing in the Runkit with our APIs (Platform of Trust) too a few months ago just to get a feeling how that works and what’s the value. I did a simple list all data products call (GET) test.
As you can see, the value is not too great in this example. But it’s a simple “hello world” for one of our APIs. That was easy to test since that API has CORS enabled open endpoint to list all products without keys or tokens in the sandbox environment. Intention is that we have some Runkits in our Developer Portal later this year.
Runkit is in my opinion one of the easiest service to create dynamic “hello world” examples for APIs and libraries.
Hello Worlds of API Economy are the simplest ways to use our APIs
Something more to read:
- The importance of “Time to First Hello, World!” an efficient API program
- Time to First Hello World
- Time To First Hello World : Critical to Product Success
- Six Ways to Accelerate Time to First “Hello World”
Some more to read from 100 Days DX
- #100 - The biggest open resource on Developer eXperience so far
- #99 - Hackers - the top 1% of engineers
- #98 - Invalid Open API spec files ruins the developer experience
- #97 - Lightweight API evaluation framework
- #96 - Embracing open source community driven tools development
- #95 - Exploring the multilevel nature of API Design Guides
While you are here...
Check out Platform of Trust in which I've worked to enable best possible developer experience!
Comments