The healing power of JavaScript


A bit more A year ago, as Covid-19 lockdowns began to spread across the world, most people grabbed toilet paper and canned food. The thing I looked for: a search function.

The purpose of the search function was somewhat irrelevant. I just needed to code. Code is calming because it can provide control in times when the world seems to be spiraling. Reductively, the programming consists of little puzzles to be solved. Not just inert puzzles on living room tables, but puzzles that breathe with a strange life force. Riddles that make things happen, that get things done, that automate boredom or allow the publication of words around the world.

Like many other writers and artists, I run a personal website. My current one has been active for almost 20 years. Code in mind, I brushed off my rusty JavaScript skills and started looking for fuzzy search libraries that I could add to my homepage, to make it easier to find specific essays in my collection.

Break the problem into pieces. Put them in a to-do app (I use and love things). This is how a creative universe is built. Every day I dismissed the general collapse of society that seemed to be happening outside of my life, and I immersed myself in the research work, choosing one thing to do. Covid was big; my to-do list was reasonable.

The real joy of this project was not just making the research work, but the refinement, the polish, the cutting edge bits. Getting lost for hours in a world of my own construction. Even though I couldn’t control the impending pandemic, I could control this small group of bits.

The whole process was an escape, but an escape with a forward momentum. Getting the keyboard navigation style just right, shifting when the search payload was delivered, balancing the size of the index and the usefulness of the search. And most importantly, keep it all light, deliciously light. And then write it down, make it a tiny “essential” on GitHub, share it with the community. It’s like an alley for others: come on now you use it on your website. Super fast client-side Hugo search optimized for the keyboard.

It’s not perfect, but it’s damn good enough.

The point is, the habit of looking for code is not just healing for oneself, but a trick to turning a sense of dread into something: a function that seems to add, even in a trivial way, a little bit of value. to the larger whole. in a troubling moment.

I started to code when I was 10 years old and have been running with it ever since. Autodidact, mainly. I had a supernatural awkwardness with others. The machine was reassuringly literal and seemed to promise access to a world that even the adults around me couldn’t understand. In this way, the code became a friend – a pal without judgment.

A pattern was established: When the complexities of social situations exhausted me as a child, I turned to code, I became an isolate. Ellen Ullman writes in her book Life in the Code: A Personal History of Technology, “Until I became a programmer, I did not fully understand the usefulness of such isolation: silence, the reduction of life in thought and form; for example, going to a dark room to work on a program when relationships with people get tough. “

Reading assembly language books in college or programming BBS software in high school therefore did not explicitly fit in as an ointment. My first conscious recognition of the palliative power of code came a few years ago when I refactored my website from one content management system to another. It sounds implausible, but it’s true: I was cured by a CMS, a phrase unique to Google – and for good reason.

Leave a Reply

Your email address will not be published. Required fields are marked *