3 Lessons about DX from building “now-logs”
I’m going to share my experience building now-logs, an open-source realtime logging tool for node.js, specifically solving a pain for the now community.
Developer Experience (DX)
My definition for DX is simple:
“DX is how developers feel while using your tools, code and APIs”
The thing I am most impressed with working with now, is the focus on DX and how it makes me feel. Every tool I use makes me feel happy and smart. The creators invested a lot of thought into every small detail and it shows.
I decided to have DX as a main feature of now-logs. I wanted it to feel like magic, be fast to integrate and super simple to use.
In the end, 3 things made the DX great:
1. Killing the sign-up process
Developers just want to start using a tool without signing up for a service. However, services usually require you to sign up to get your private API_KEY. Let’s remove this step so developers can jump straight to code.
In order to avoid a signup step, developers can just come up with their own API_KEY and use that. If chosen wisely, there should be no collisions.
Now you can start using now-logs with a magical one liner:
require(‘now-logs’)(‘the-api-key-i-came-up-with’);
2. Not inventing new workflows
Developers are viewing logs in their terminal, but all 3rd party logging solutions requires you to login to a website to see the logs.
Let’s fix that and get us back to the terminal where we belong.
Fortunately, creating command line tools in node.js is a breeze. now-logs is a super simple command line tool:
now-logs the-api-key-i-came-up-with
With this in your terminal, feel free to pipe (|) and direct (>) your output to other programs. This makes me feel at home.
3. Investing in website & documentation
A good website can have enormous impact on the usage of tools and open source libraries.
About 1/2 of the effort building now-logs was directed to the website’s copy, the GitHub README.md and the usage output of the now-logs cli tool.
The website is both a demo and tutorial so within 1 minute you should know if you should be using now-logs or not.
Hacker Noon is how hackers start their afternoons. We’re a part of the @AMI family. We are now accepting submissions and happy to discuss advertising & sponsorship opportunities.
If you enjoyed this story, we recommend reading our latest tech stories and trending tech stories. Until next time, don’t take the realities of the world for granted!