Rumi and Data Science

  • Yousef Mehrdad Bibalan

Since last week, when the current university semester officially ended, I’ve found a little time to work on the things I love. Learning data science and machine learning—itself an endless journey—helps me think about new problems and prepare possible approaches for them in my mind.

One class of these problems is the application of machine learning to Persian literature. Those of you familiar with machine learning surely know how many fascinating problems can be defined in this area—problems that help us understand and expand upon it.

Last week I decided to start one of the projects I’d been wanting to do and devote part of my between-semester break to it. This project was a study of Rumi’s poetry. I downloaded the data from the Ganjoor website and began working on the Divan-e Shams. Understanding the database structure took a little time, but thanks to its simple and elegant design, I quickly figured out how to find the verses. The initial results were very interesting to me.

One of the significant problems I ran into was the lack of libraries and trained models for the Persian language. I hope the number of these libraries and models keeps growing day by day. I kept thinking about how many interesting interdisciplinary projects could be defined at the intersection of Persian literature and data science.

Though you have cut yourself away from me, I am not without hope;
Though you have chosen another beloved over me,
As long as I have life, I will grieve for you—
For within despair there lie many hopes.
— Rumi

Before I forget, let me mention that Ganjoor is one of my favorite websites. I’m grateful to its founder and to everyone who works on it. May you endure.

Selected verse:

As long as you seek the jewel of the mine, you are the mine;
As long as you crave a morsel of bread, you are that bread.
If you grasp this hidden secret, you will know:
Whatever you are searching for—you are that.
— Rumi

Code Calligraphy (Part 1)

  • Yousef Mehrdad Bibalan

Preface: Calligraphy
When I was a student, I loved having beautiful handwriting. So I used every opportunity to make my writing more beautiful. In the second year of middle school (seventh grade), when I attended Shahid Bahonar School in Bibalan, Mr. Haghshenas was our English teacher. God rest his memory! He had very beautiful handwriting. As far as I remember, he would write the dictation tests in one student’s notebook, then another student would copy it onto the blackboard, and the rest of us would write from that and take the test. Since I sat in the front row, I would hand my notebook to Mr. Haghshenas—so that afterward I could practice from his handwriting and improve my own.

In my first year of high school (ninth grade), Ehsan, one of the older students, had very beautiful handwriting and wrote his notes in a lovely broken (shekasteh) script. Using the notes as an excuse, I would borrow his notebooks from the previous year and practice writing with them. Beautiful handwriting gave me a good feeling.

Later, at my wife’s suggestion, we took a pen-calligraphy class together. It was very instructive. The chance to be together (amid all the work commitments) alongside proper calligraphy instruction left me with a fond memory of that class. I wished I’d had the opportunity to take such a class when I was younger.

Whenever I talked with others about calligraphy, a point they’d make was: “If I write patiently and without rushing, my handwriting is good, but if I hurry, it falls apart.” But I would think to myself that your handwriting should be beautiful whether you’re in a hurry or not. Circumstances may reduce the quality of your writing a little, but not so much that it turns into a scrawl. It goes without saying that I’m no expert calligrapher—this is just my personal impression and experience.

Although in today’s modern world there’s no longer any need to write by hand, that modest calligraphy skill of mine was lost too, for lack of “practice.” Even so, I still get excited when I see beautiful handwriting, and I find myself examining it like a work of art.

When I look back at the past, I can describe my experience of learning calligraphy like this:

  • Beyond simply loving beautiful handwriting, my motivation to learn was that I didn’t want my writing to be a scrawl.
  • Seeing beautiful handwriting and trying to copy and reproduce it was very effective in my learning, and it worked for me.
  • When I see beautiful handwriting, even though I can’t write that way myself, I recognize that it’s “beautiful,” I get excited, and it enchants me.

Now my love of calligraphy has crystallized in me in a different form: a love of code calligraphy!

This post is an introduction to writing about some of my experiences with “calligraphy” in the world of programming. I hope in future posts to look at programming through this window and write about my experience. It would be wonderful if I could hear about your experiences too.

Selected quote:

We are known in the world by three names: literature, carpet, and calligraphy. Calligraphy exists within the other two arts as well. The small difference is that the illuminator works with pen, ink, and color, while the carpet weaver works with wool and cotton. Illumination is the very design of the carpet.
— Mohammad Salahshour, master of calligraphy

Flawless, Perfect Software

  • Yousef Mehrdad Bibalan

You Can’t Write Perfect Software. Did that hurt? It shouldn’t. Accept it as an axiom of life. Embrace it. Celebrate it. Because perfect software doesn’t exist. No one in the brief history of computing has ever written a piece of perfect software. It’s unlikely that you’ll be the first. And unless you accept this as a fact, you’ll end up wasting time and energy chasing an impossible dream.


Andrew Hunt, author of The Pragmatic Programmer

P.S. Image by Gemini

The 10x Engineer

  • Yousef Mehrdad Bibalan

Foreword

A host of the timid avails not in war — One warrior man is better than a hundred thousand.

Andrew Ng — founder of DeepLearning.AI and co-founder of Google Brain — has a clear yet challenging message for software developers watching the world of AI:

“AI won’t replace software developers, but software developers who use AI will replace those who don’t. The future of coding is a symphony between human problem-solving and AI’s capacity to execute it quickly. Your core value shifts from writing code to architecture, debugging, and — most importantly — directing intelligent assistants. Learn to speak the language of AI, and you’ll become a 10x-more-powerful engineer.”

The following are excerpts from Andrew Ng’s talk titled “From Code to Product in Hours — The New Reality of AI Development,” some of the key points of which I’ve captured below.

Discussion: Andrew Ng’s key points for developers

In this conversation, Ng explains the practical skills, philosophical shifts, and emerging bottlenecks that developers need to know in order to stay at the front line. The text below is a free interpretation of his remarks.

1) Focus and a new look at speed

Speed is the single biggest predictor of success for innovative projects. AI is the driver of that speed: it makes building prototypes and small standalone products 10× faster, and it increases the speed of producing final, ready-to-use products by about 50%.

2) A new philosophy of software

The new motto of smart teams is “move fast and be responsible.” It means that prototypes are built very quickly in a safe, isolated environment, and then safety and security are added to the selected, scalable ones.

3) Code as an artifact (output)

Because AI can write code, code as an output becomes less valuable. This makes important decisions — such as architecture or database design — more like a “two-way door” (i.e. reversible; in other words, decisions that, if wrong, can be easily corrected). This capability enables more iteration, and even rebuilding from scratch.

4) The new bottleneck

As building software becomes easier, deciding what to build becomes the biggest bottleneck. Ng calls this the “product management bottleneck.”

5) Honing your intuition

Developers should work to develop and sharpen their intuition and inner judgment, drawing on users to make decisions about products. The goal of collecting user data is to train the way you judge — not merely to use it to make a decision in one specific case.

6) Learning to code

The advice that people shouldn’t learn to code because AI will automate it is “one of the worst pieces of career advice in history.” Every step of automation (from assembly to higher-level languages to AI) has made coding more valuable and more accessible.

7) Essential skills in the future

The most important skill in the future is being able to tell a computer exactly what you want it to do. Knowing the language of the computer and coding provides a deeper understanding for more precise control of AI tools.

8) The role of the AI Engineer

We are facing a shortage of “AI Engineers.” The skills required for this emerging role include: familiarity with AI-assisted coding, expertise in AI building blocks (including RAG and agent workflows), rapid prototyping skills (including basic full-stack knowledge), and basic product-management skills and user judgment.

9) Rapid Engineering

Andrew Ng prefers the term “Rapid Engineering” over “vibe coding.” He describes the process of working with AI coding assistants as a “deeply intellectual exercise,” not merely relying on “vibes.”

Talk video

Andrew Ng: From Code to Product in Hours – The New Reality of AI Development

Excerpt: None.

The Psychology of Money

  • Yousef Mehrdad Bibalan

I read the book The Psychology of Money: Timeless lessons on wealth, greed, and happiness alongside a few of my dear friends.

In this book, Morgan Housel examines how people think about, manage, and deal with money. Rather than emphasizing technical aspects, the author explores the behavioral and emotional sides of human beings. Drawing on psychology, historical facts, and personal experiences, he attempts to show that financial success depends more on human behavior, attitudes, and personal values than on intelligence or technical knowledge.

In this book, you won’t find any signs of ready-made solutions or technical and financial advice. My experience reading this book consisted of “learning the core of important problems,” “understanding the dimensions of the issue, especially from a psychological perspective,” and “having my beliefs and past learnings challenged.”

Without giving away any spoilers, let’s look at a few examples together:

  • The book explains that being “rich” is different from being “wealthy,” and what you should actually strive for is wealth!
  • Elsewhere, the book explains a concept called “enough,” emphasizing that what constitutes “enough” is entirely personal. It then explores how this concept can be used to achieve “financial freedom.”
  • In another section, the book warns you to watch out for the “You vs. Me” trap. When investment advisors—whether amateur or professional—give advice, they usually have their own circumstances or a specific type of investor in mind. You must be careful, as your situation might be completely different from the people these advisors are targeting.

The Psychology of Money is one of those books that you should re-read every once in a while. More importantly, you can hold discussion and brainstorming sessions for every single chapter, which will undoubtedly spark engaging debates ;).

I am grateful to my dear friends who initiated and gave me the perfect excuse to read this valuable book.

Excerpt:

“People do some crazy things with money. But no one is crazy.”

— Morgan Housel, The Psychology of Money

Press ESC to exit search