Essay

Why I Write and What I Will Write About on This Blog

I wrote every day for years — two books, a Persian blog, a novel for learning machine learning — then stopped. Why I am starting again, and what goes here.

I used to write a lot. In fact, I had a good habit of writing every day, although not in English.

I remember one night in the fall of 2015 when I was walking alone toward the dormitory at Amirkabir University of Technology (AUT). My stomach was full, and the weather was perfect. I was thinking about my future, a future in which immigrating abroad did not have even a tiny place, and about all those fancy terms such as personal branding that I kept hearing in conversations among students, professors, and friends.

Out of the blue, when I was almost at the dormitory, an idea popped into my mind: Why not start writing a weblog?

I had no idea what it took to create a website. Still, I became so excited that I remember reaching our room and immediately talking about it with my friend Hossein. Back then, there were not enough resources to give me a clear idea of where or how to begin. The Persian content available online was either confusing or insufficient, let alone having something like ChatGPT to start an immediate brainstorming session.

Hossein listened. He was a kind and supportive friend, and he said he knew a few people who could help. That same night, I started calling his friends and collecting my first clues about how to begin. A week or so later, the website was up and running.

I wanted to write professionally rather than keep an informal diary. I started writing about health systems engineering, my M.Sc. specialization within industrial engineering at AUT. The discipline was relatively new, and I devoted myself to becoming one of its pioneers in Iran.

Believe it or not, the attempt was quite successful. I gained a lot of visibility and made many connections through the website and its social media channels. During that period, I decided to turn the diary I had kept during an internship at a hospital into a free book called Toward Maturity: Diaries of an Engineering Student.

Cover of Toward Maturity: a mint-green field patterned with small black paper aeroplanes, the Persian title in gold, and a foreword credited to Hormoz Mogarei
Toward Maturity — free to read, in Persian

I kept writing and writing. I even put nearly all my energy into my first published book, Improvement National Team: A Love Story of a Business Transformation. I still love its central idea. It was the first time I had fallen in love with someone, and I had always wanted to put what I knew about Japanese management methods, including Kaizen, 5S, and especially the Toyota Production System, into a story adapted to the Iranian context.

Cover of Improvement National Team: a bright yellow field with the Persian title in red and black stick figures running across the lower half
Improvement National Team — in print, in Persian

A well-known Iranian publisher released the book in a limited print run. Many practitioners I knew read it, and I received a great deal of feedback, sometimes positive and sometimes negative. One large industrial corporation in Isfahan even bought a substantial number of copies to give its employees as Nowruz gifts.

My passion for writing kept growing. In 2016, I also began writing professionally about machine learning and AI in Persian. Those articles attracted a fair amount of attention, and I decided to make a much bigger move, one that, looking back, probably came at the wrong time.

I had a plot in mind for a novel that would teach machine learning through a love story. It followed a similar idea to my previous book, but this time I wanted to write it in English.

My English writing skills were limited then, and the only tools I had were dictionaries and the novels I read in English. Still, I was determined. For around eight months, I spent four or five hours on the book almost every day. I first wrote it in Persian, even though the story took place in the United States. Then I worked slowly through the English version, trying to make the setting believable and every sentence accurate and deliberate. After eight months, the first draft was ready.

I was eager to see it published, but I had given almost no thought to how publishing actually worked. Once the draft was ready, I started emailing English-language publishers without the slightest idea of how the Western book industry operated. As you might guess, I was rejected again and again. Computer science publishers thought the book was a novel, while fiction publishers thought it was a computer science book.

I tried to publish it independently through Amazon, but doing so required access to credit cards and financial services that were unavailable in Iran. I considered using a friend’s credit card, but she was understandably reluctant. I also contacted third-party publishers with international connections, but they wanted a share of the intellectual property.

To make a long story short, I gradually became disappointed. At the same time, my desire to study abroad and earn a PhD was growing, so I told myself, Let us leave this for now.

A year before coming to Canada, I became busy with the application process. Then came the work of finding my place in a new country. Eventually, I decided to release the book, The Deus Machine, for free on GitHub. I did that, but I made no real effort to promote it afterward.

Cover of The Deus Machine: a dark circuit-board background with a brain drawn from pale circuit traces, subtitled A Novel for Learning Machine Learning
The Deus Machine — free on GitHub

After coming to Canada, starting work, and pursuing a PhD at the same time, I lost my momentum for writing. The arrival of ChatGPT reinforced that feeling. Why should I bother writing, I wondered, when a tool could produce almost anything in seconds, in any tone or style I wanted? I especially remembered all the pain involved in writing The Deus Machine and imagined how much easier the process would have been with these AI tools.

I lost momentum, but not interest.

As I became more experienced in reinforcement learning (RL), another idea appeared: Why not write a practical book about applying RL to business problems? I have always had, and still have, a passion for bringing RL into the real world, where it can solve real problems beyond the examples in the Gymnasium library or Atari environments. Those environments are excellent for designing and testing new models, but they are not always enough to keep people excited about breathing new life into business operations.

I wrote a proposal. After several rounds of interviews and email conversations, it was accepted. So, here I am. I have been writing Applied Reinforcement Learning since late 2024, and I hope it will be ready for publication soon.

Even then, I missed the old feeling of immersing myself in diaries and blog posts. After postponing it many times, I finally decided to write regularly again. This time, I am doing it neither for business nor for personal-branding bullshit. I am writing for myself, for my own curiosity and interests, and to leave traces of my thoughts in a place where I can write about whatever I want without having to satisfy all the reasonable and unreasonable expectations that come with writing for a journal or a publisher.

This is where the story of this blog begins.

What I am going to write about

Mostly AI, and more specifically the areas that interest me or whose challenges I am currently dealing with. I do not want to publish dry, soulless tutorials or write fancy posts for the sake of writing them, although there is nothing wrong with either form. I would rather share my own thoughts and experiences as I run experiments and work through problems.

In other words, each post will grow out of either a need or a motivation. The need comes from something I am working on and an understanding I would like to abstract and share. The motivation comes from a subject I want to learn more about.

In the language of RL, this blog is an exploration-exploitation trade-off. I will exploit what I already understand by sharing the excitement, challenges, lessons, and visions that come from my current work. I will also explore unfamiliar territory and share the joy of learning it with you.

For now, I would love to focus on:

  • Testing and experimenting with new ideas, exploring the inner mechanisms of algorithms, and asking where they can be applied, where they cannot, and why they sometimes fail.
  • Reviewing papers worth reading, explaining them in plain language, and possibly reproducing their results.
  • Teaching concepts in AI, RL, and optimization for which I have not found good teaching material.
  • Thinking philosophically about the open challenges I see across the wide and constantly expanding spectrum of AI.
  • Sharing interesting non-AI material, including papers and good videos, along with my reflections on them.
  • Writing the kinds of diaries that I think are worth sharing with you.

Writers such as Chip Huyen, Lilian Weng, the writer behind Lil’Log, Sebastian Raschka, Aleksa Gordić, and many others have shown me the value of writing consistently. Continuity and commitment are the only two keys I know for unlocking any meaningful achievement.

As I wrote in my user manual, I am comfortable saying no. But when I say yes, you can count on me. This time, I have said yes to writing regularly, without any external motivation. I am doing it for the pleasure of writing and for the chance to share what I think with other enthusiasts like you.

As I write these words, I imagine Nasir al-Din al-Tusi, the Persian polymath, architect, and philosopher who served as an adviser to Hulagu Khan. I picture him finishing his daily duties, sitting behind a simple desk, and returning to mathematics. In my imagination, he tells himself: Where are those kings now, to see the pleasure I am enjoying?

Intellectual work carries a kind of joy that is hard to describe in the abstract. You have to feel it and live it. I want to share some of those feelings and lived experiences here.

So, let us get started.