The Virtue of Laziness

My son, Alexey Radul, is a programmer. He taught me the importance of laziness in programming.

One of his rules:

Not to write the same line of code in the same program twice.

If you need the same line of code in the same program, that means you should either use a loop or outsource the line to a function. This style of coding saves time; it makes programs shorter and more elegant. Such programs are easier to debug and understand.

I remember how I copied and pasted lines of code before he taught me this rule. Then I needed to change parameters and missed some of the lines during changing. Debugging was such a headache.

Mathematicians are way lazier than programmers. Consider the system of two equations: x+2y=3 and 4x+5y=6. There are no repeating lines here. Only letters x and y appear twice. Mathematicians invented the whole subject of linear algebra and matrices so that they would not need to rewrite variables.

Mathematicians are driven by laziness. Once ancient mathematicians first solved a quadratic equation, they didn’t want to do it again. So they invented a formula that solves all quadratic equations once and for all.

I try to keep up with tradition. I try to make my theorems as general as possible. When I write my papers, I try to make them short and simple. When I think about mathematics I try to get to the stage where the situation is so clear I can think about it without paper and pencil. I often discover new theorems while I am in bed, about to fall asleep. Sometimes I wake up with a good idea. So I do my job while I sleep.

I love my profession. I get paid for being lazy.



  1. Chris:

    I don’t know what kind of formatting your blog supports, but I’d point out that the concept is pervasive throughout the (good) programming culture and is acronymized [DRY]( for “Don’t Repeat Yourself”, although the focus is more on correctness and reusability than laziness. Cheers.

  2. none:

    Laziness for engineers

  3. Tanya Khovanova:



  4. Motlalepula Mokhele:

    however I tend to differ to disagree with you. actually I can say mathematicians are smart workers

  5. Jeff Zanooda:

    That’s only half of the story, though. The other half is dependencies.

  6. Count Iblis:

    Umbral calculus would not have been invented had mathematicians not been lazy:

  7. Lew:

    Programmers who do not follow the DRY principle are WET – Write Everything Twice, or We Enjoy Typing!

Leave a comment