top of page

[Bali life] Why we need to study programming? -- To enjoy life ;-)

At an internal online retreat last week, I talked about "what is the most important thing". The older I get, the more I think that the most important thing is "time". When I was an undergraduate, I took four different degrees simultaneously, and the one I enjoyed the most was economics. A lot of people don't understand the difference between economics and accounting or finance. Accounting and finance are about money; economics is not. Economics is the study of utility. The utility can include money, but it also means how much you enjoy your life. When you get right down to it, I think it's time.

In microeconomics, there is a curve called the Indifference curve. What this curve shows is that when you compare two things, there is always a trade-off. The line is curved because the first slice of pizza you eat is delicious, but as you eat more and more pizzas, they become less and less delicious.

And I think the most common example of this Indifference curve is the trade-off between work and leisure. When you get down to work and leisure, it's a trade-off between money and time. I say that the effort we put into our work is wearing away our leisure time. If you say that effort is not time, then you honestly haven't worked hard enough. If you've worked to the point where you can't work anymore, then the effort is time. How to be happy with this Indifference curve is to move the curve itself to the upper right. That means working more efficiently and earning more money. When you work so hard that you can't work any harder, the only thing you can do is to work more efficiently. This can be through automation, using systems, or hiring people to do the things you're not good at.

I've had a computer in my house since I was 7 years old and I've been programming since I was 10, but in the last few years I've been so busy that I don't do much programming anymore. But when I got to the point where I couldn't work any more, I realised that I was wrong. Recently, I started to use AppleScript and Bash scripts again to automate things. With AppleScript, I can even automate the graphic user interface. Wen can even automate the graphical user interface and "switch to a dictation language" where only a graphical user interface exists.

I also started using Bash scripting for the first time in years and found that it saves me a lot of time. For example, to extract and save images contained in multiple PDF files, you can do the following.

for fname in *.pdf; do
mkdir ${fname%.pdf}  ;
pdfimages -all $fname ${fname%.pdf}/${fname%.pdf} ;

This will create a directory with the same name as the PDF and save the image data there with the filename. If you add pdf2docx to this first, you can save the image data in the word document. Creating a script can be time-consuming, but you can save time afterwards once you've done it. Furthermore, making scripts is fun, but simple work is not fun, so we should do more programming from the point of view of utility.

With money on the vertical axis and time on the horizontal axis, the angle of the Indifference curve gets steeper as you get older. We don't have eternal time, so let's learn to program to make the most of it.

45 views0 comments

Recent Posts

See All


bottom of page