Niyas Mohammed

Machine learning + Delightful UX
Founder, Neuralcraft

When everything clicks into place

December 22, 2021

Last week I was assigned a task: Make a prototype of a search system and evaluate it’s efficiency for a specific use case. But there was a catch- I only had a couple of days to do it.

Since we’re short on time I was told I could make a command line version.

  • Well, I certainly could do that. But if I make a terminal app, who would use it?
  • Would it just engineers who can run the script or would it include a broader set of eyes?
  • Would I run as many queries as I want to experiment with?
  • Would I be happy using it?

There are two things to keep in mind when you’re building stuff, and they’re quite contradictory:

Anything worth doing is worth doing poorly

Meaning you should be able to prove your point with the roughest of prototypes.

In my case, if the search system was any good, it should be evident whether it’s run via a terminal or a fancy webapp.

Anything worth doing is worth doing well

Meaning, if you’re building something anyway, why not do it well?

I decided to go and make a webapp. But I also knew broadly what all tools I’d need and how to build it fast.

Instead of my beloved FastAPI, or ReactJS, I picked Streamlit. I ensured I was running everything in a virtual env, and that I had a script to install dependencies. The abstractions I needed for the search engine classes came with an ease that only comes with practice. Code flowed that night. I couldn’t sleep because I was having so much fun building something new.

And just like that, I was able to deliver everything (and then some!) within the allotted time. I threw in a few icons and othe extras just to add some oomph. When I finished up, I showed it to a couple of people and deployed in under an hour.

And it worked. Like magic. ✨

Everybody was pleasantly surprised to see the prototype in action. Junior engineers asked me questions. I showed them the code, and walked them through. Then they wanted to know where I learnt do this kind of stuff. There was no easy answer to this one.

It’s a really special feeling- to be able to craft something well. The right code or abstraction didn’t come out of the blue.

All the thousands of hours I spent writing, reading, and debugging code had helped me become a little better over the years. I no longer had any mysterious variables like x and str. My environment file was always up to date. My README.md files were never blank.

And then one day when I sat to build a prototype, it all clicked into place.

A beautiful tree for you

With love,
Niyas