Combining relaxation and programming - How it can succeed? Constantly concentrating in everyday life, always keeping an overview, taking full control of all areas and trying to reconcile conflicting aspects. Sounds like a feat that consumes a lot of energy. Can it perhaps be done differently? What about simply acting in the flow, letting things happen, relaxing, and getting to the right place at the right time?

A paradox:

Throughout the course of history, mankind has created more and more “aids”, from washing machines and dishwashers to the smart home. Our devices are getting smarter and smarter and perform tasks partly on their own. Nevertheless, the pressure seems to be growing steadily and people seem more and more stressed and unhappy. For years, mankind has been searching for a recipe for happiness, a miracle pill, so to speak, that will make all worries disappear and give us a carefree life. The inventor of this pill would probably become a billionaire straight away. In fact, there is no recipe for happiness. Everyone has to learn for themselves what makes them happy: jogging, gardening, cooking, crafts, painting, hiking, sewing, or perhaps programming. In this post, I would like to share what my recipe for happiness is and what helps me organize daily life so that I can maintain inner balance and feel happiness. One thing is certain: happiness comes from within, not from without. No one can make you happy – only yourself!

My recipe for happiness is to integrate yoga into my life. Even though it may be discussed often, I’d like to share my perspective on the topic and make some suggestions on how to integrate yoga into daily life. The goal is to feel a little more relaxation and happiness in your life. Maybe it’s worth trying instead of just reading about it. For starters, let’s begin with a brief explanation of what yoga is and what can be achieved with it.

Yoga is a millennia-old philosophy that originated in India and is still relevant today. Yoga seeks to harmonise the body, mind, and soul to achieve inner balance. Yoga is not only about physical health, but mental health too. There are different types of yoga, which have common roots in what’s known as Ashtanga Yoga. The most popular type of yoga is Hatha Yoga, which focuses on physical exercises or asanas. Asanas, however, are much more than just exercises. The basic idea is that for every action, you need a firm, stable body and a balanced state of mind. Both physical illnesses and disturbances of the state of mind, like worries, tension, and fear, can be eliminated through practising asanas, so that you find inner balance again. Asanas are designed to stimulate the regeneration processes in the body. They increase flexibility, make the muscles more elastic and firmer, stimulate the heart’s movement, regulate the function of the lungs and brain, give inner strength, energy, vitality and make you happy. Unlike ordinary physical exercises that consume energy, the asanas are designed to add energy to our body. This is done by supplying blood to the joints and internal organs, moving the spine in all directions, and targeted breathing.

Find new job opportunities in your city

Let’s begin with practical implementation

According to yoga teachings, breathing or pranayama is of paramount importance in all areas of life, because life is breath and breath is life. In our daily life, we pay far too little attention to breathing. Through conscious breathing, you can achieve so much. For example, we can improve our oxygen saturation, increase vital capacity and concentration, and maintain self-control in all situations. I could go on and on about the types of yoga, asanas, techniques, flows, and the philosophy behind them. However, this is enough for our introduction and at this point, I’d like to motivate you to begin with practical implementation. All beginnings are difficult, but if I can manage to get you up from your seat and do the following exercise, I’ll already be happy. Maybe this can be the beginning of your yoga journey?

To get you started, first, let’s try to set an anchor that nearly everyone involved in programming has encountered at some point. We’re talking about the B-tree. In computer science, a B-tree represents a data or index structure that sorts data by key and finds its application in databases and file systems. B-trees were designed by Prof. Rudolf Bayer to help optimise disk storage management. They are particularly useful for dealing with large amounts of data, only a fraction of which can be stored in the computer’s main memory. A B-tree is always a fully balanced tree with a parameter k characterised by the following properties:

  • The tree consists of leaves and roots. Unlike a normal tree, a B-Tree grows from top to bottom, i.e. from the leaves to the root. This means that the elements are inserted into the leaves.
  • The B-Tree has the same depth everywhere and all nodes are at least half filled.
  • The nodes of the tree contain a variable number of keys. The maximum allowed number of keys depends on a parameter t or the degree of branching of the tree. In practice, the limitation 2-4 is often used, i.e. at least two and at most four elements can be stored in a node.
  • Therefore, each node has at least k and at most 2k entries. The root can have between 1 and 2k entries.
  • If a node has n entries, it must have at least n+1 references to the “children”.

At this point, it should be mentioned again that a B-tree is not a binary tree. Figure 1 illustrates the structure of a B-Tree and sets a demarcation to a binary tree.

B-tree vs. binary tree

Fig. 1: B-tree vs. binary tree [1].

To better understand how a B-tree works, let’s look at the splitting of the tree (Fig. 2).

Splitting a B-tree

Fig. 2: Splitting a B-tree

Assuming we want to insert a new key k into the index tree, we can follow the steps below:

  1. We start at the leaf node of the tree and search for a node x in whose value range k fits.
  2. Next, we insert k into x. In doing so, we want to observe the sorting order.
  3. In the third step we check how full the node is: Is the node too full? Is length(x) = n+1?
  • a. If yes, then we look for the middle key keyi ε x and move it to the parent node x.parent. We set all keys keyj < keyi as left child elements and all keyj > keyi as right child elements of keyi. We check the fill level of x.parent again.
  • b. If the node is not too full, then k can simply be inserted.

Have you perhaps noticed what makes the B-Tree special and what an index structure tree can have in common with yoga? It’s the balance! A B-tree is always a fully balanced tree. Vrikshasana, the tree pose, is a yoga pose that helps promote inner balance and find equilibrium. It’s a simple basic exercise that has a stabilising and harmonising effect and can strengthen stability and the ability to concentrate. The exercise is also suitable for beginners.

  • Stand upright and shift your weight onto your left foot. To do this, stabilise the right knee and hip joint by tensing the thigh and shift the pelvis slightly to the left.
  • Next, place the sole of your right foot on the inside of your left thigh. Rotate the angled knee outwards as far as it will go. An easier variation is to place the sole of your right foot across your left foot so that your toes point to the right, without touching the floor.
  • Your hands are together at chest level. Your gaze is calm, concentrated, and straight ahead. The whole body is tense and stretched.
  • Breathe in and out calmly and consciously. When you feels stable, stretch your arms and hands above your head.

Then you change sides and repeat the whole thing. Try to let go of all of your daily thoughts and worries and concentrate on a beautiful tree. Perhaps a B-tree? This balancing posture requires both flexibility and stability. Try to find a balance between too much and too little firmness and tension. The roots are decisive. Your feet form a stable base. The “branches” and “trunk” are allowed to swing with the wind and surrender to the “mobility of life”. The roots provide support.

Although the tree pose is a passive exercise, it nevertheless strengthens the muscles around your entire leg: from the thigh to the calves to the ankle and foot. The tree pose helps gain strength and length in the torso and throughout the spine, helping improve posture. Opening up your chest supports free and even breathing and promotes blood circulation. “Code meets Yoga” – why not?


AUTHOR

Elena Bochkor


Elena Bochkor is a UX design and research expert who specializes in creating mobile apps and websites. With over four years of experience, she is skilled in wireframing, prototyping, usability testing, and research. She is self-employed and operates under LARInet, offering her expertise in creating intuitive and visually appealing interfaces that provide optimal user experience.