Developer experience (DX) started to matter to me when I had to schedule a meeting to support a developer from another company integrating with my employer.
But Why After That and Not Before?
Because I never thought DX was a thing, probably because I’ve always been a “hacker” and, when facing issues, I dig deep and persist until I solve them.
I know many developers out there like to have someone guide them and offer support to deliver something, but I didn’t know the term existed.
The process
The meeting was initially meant to help debug issues using our internal tools or to understand whether there was a bug in our codebase, which in this case was the least likely option since the API was exhaustively tested, but who knows.
After the meeting started, I had to ask which language was being used for the integration (they were using Python), what endpoint they were calling, and open our tools (e.g. log monitoring and exception tracker).
After gathering some data from other endpoints, only one endpoint was misbehaving. With that, I opened the codebase and tried to dig through the code to find some issue or insight about the problem.
I found nothing, looked at our unit tests, and nothing suggested an error on our side, so I asked them to show a snippet of how the developer was calling our API. Since I knew a little about Python, I started searching through the internet and found that the issue was with the way the developer was creating the JSON payload to send. Example below:
import requests
-payload = "{ 'foo': { 'url': 'http://something.lvh.me' } }"
+payload = { 'foo': { 'url': 'http://something.lvh.me' } }
r = requests.post(
'http://localhost:9292',
verify = False,
json = payload
)
print(r.status_code)
print(r.headers)
Note the difference? The way the developer was sending the payload was as a string, and when our API received it, it ignored it and didn’t behave accordingly. I don’t judge the way they wrote that code, because in the past I wrote something similar many times, but sometimes many of us struggle to find the problem.
After the call, I kept thinking about it, commented on it with my CTO, and he said, “Welcome to DevX.”
Lesson learned
Most of the time, we have to care about the developer on the other end, probably by writing some code snippets or guides besides the API documentation, which in some cases isn’t enough, like this one.