I have heard from my fellow programmers about cooking, the more they are able to handle abstract problems at work, the better they are at cooking. Cooking here in the context is not just about making a tasty dish, but cooking a meal that is tasty, healthy in the long run and maintaining the kitchen well to keep it ready for subsequent meals.

A majority of the us just concentrate on a single (or two or three) nice meal in the taste and quantity aspect as great cooking, but do not see it as a sustainable thing that we will do it on and on. Why I drew parallels with programming is what I learnt at work while coding that was applicable in the kitchen, following are a few.

  • Always leave the code better than how you found it, (Campsite rule).
    • Leave the kitchen in a condition that you can cook your next meal immediately. Don’t leave it in a mess for someone else to cleanup.
  • Abstractions help you to concentrate on things as a whole, instead of the simple sum of the parts. You know how things work at ground level as well as how it looks when seen from high above.
    • This concept is key to mix and match, new recipes can be born and improvisations based on the abstract taste. Substituting Almonds for coconut, ripe tomato for tamarind. Understanding how things blend with each other makes a good cook.
  • Lessening feedback time, fail fast.
    • Taste well if possible involve another person when trying new dishes. This will help to avoid throwing away a dish cooked for two hours.
  • Use of automations for mundane repeatable things.
    • Use electronic devices with timers for mundane activities like boiling milk, water, rice cooking, grilling, baking, roasting, washing so that mind is free to concentrate on things that need attention. Cleaning spilt hot milk due to forgetfulness sometimes takes as much time as cooking a meal.
  • Acknowledge when you don’t know and reach out for expert opinion even if the manual says it to do obvious things.
    • Whatever we read about cooking and then scientifically do it, there are still many artistic aspects that needs to be done to be a good cook. Listen to people who cook well and do it as they say.
  • There is a routine that helps, keep it sustainable so that you will come back next day with enough energy to go through that day again and again.
    • You can plan a great feast, but then you should give a break to recover to your normal rhythm of running the kitchen. Over time you will learn to cook a lot in a less amount of time.
  • Shortcuts give you that edge, but that is an easy way out that will lead you back into mess again.
    • It is very tempting to use taste enhancers, chemical preservatives etc to get most out of our cooking but it will be damaging in the longer run to our health

The reverse also is true, those who manage to cook well, will be good programmers.

I never consciously thought about sleep until I started working. During the days I was growing up, I had never felt sleep deprived ever. I also slept early, well into the mornings and there were too less of distractions to keep me out of bed.

Things started to change as screen time started to conquer the lives. My grandfather used to call the TV as the idiot box, even though there was only 2 hours of watchable programs every day. He said that this makes people lazy consumers and not able to do anything productive. He said that entertainment should only be used like medicine not like food.

The screen addiction was very evident even without smart phones, I have played snake game for hours together on the old Nokia phones often postponing sleep. It is very hard to limit screen time, often those endless titbits we read/watch is not of so much use and the games we play does not relax us but bait us into playing more.

If I look back, many of my bad days were due to having a bad sleep the previous night. Sleeplessness increases the fatigue, turns it into a chronic cycle of yawning, lethargy and sleepiness. Often this impairs judgement because a sound body is a higher priority in hierarchy of one’s needs.

How to sleep well, it is very hard to find a rhythm that works for a person as each person is unique. The ones which has always worked for me very well are; social media off at least an hour before bed, reading a light book to switch off the buzz in the head, keeping the room cool, a cozy bed, dim lights from an hour before bed, enough physical activity during the day to make me tired but not fatigued. This setting worked like clock work for me for years. I used to go to bed same time everyday and wake up at the same time every day.

If I succumb to the temptations of sleeping late for a few days, then things go out of gear which takes a few weeks to get back into rhythm. For me a good night always meant a good day next day.

Someone I met last year mentioned that the reason the 737Max planes went down was because it was coded by developers from a country where there was no aviation engineering experience. This person also went on to say “What else can you expect from people who are paid less than 9$ an hour wage”.

What is evident from this person’s thought is, irrespective of all the experience in aviation, expensive engineers, highly paid directors this crash was a result of a developer who coded as per the specification given not because of the carelessness of the others, in spite of airline industry being one of the hallmarks of safety standards.

Why this kind of thought irritates me is that a lot of people equate cost to quality. If something is not expensive, it is of poor quality. Expensive flights like concorde ran into losses, nobody eats at michelin star restaurants every day even though they are the best in the business.

It is very much possible to reduce cost without cutting quality, recent example I could think of is SpaceX that too in space technologies which is “Rocket science”. If something has failed, it is not necessary that the component of poor quality always costs the lowest.