<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Starting Point</title><link>https://www.nacnez.com/index.html</link><description>Recent content on Starting Point</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Fri, 07 Mar 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://www.nacnez.com/index.xml" rel="self" type="application/rss+xml"/><item><title>Our Ultimate Quest: The Simple (Yet Complex) Answer</title><link>https://www.nacnez.com/the-answer.html</link><pubDate>Fri, 07 Mar 2025 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/the-answer.html</guid><description>&lt;h2 id="the-quest--answer"&gt;&lt;a href="#the-quest--answer" class="header-anchor"&gt;&lt;/a&gt;The Quest &amp;amp; Answer
&lt;/h2&gt;&lt;p&gt;We&amp;rsquo;re all on a journey, aren&amp;rsquo;t we? Searching for that elusive &amp;ldquo;ultimate solution&amp;rdquo; to better ourselves. Whether you&amp;rsquo;re focused on personal growth, spiritual enlightenment, or just trying to be a decent human being, the quest is the same.&lt;/p&gt;
&lt;p&gt;For me, the spiritual aspect is paramount. Honestly, every action, every choice, can be seen as having a spiritual dimension. And in this pursuit, I&amp;rsquo;ve stumbled upon what I believe is the key: &lt;strong&gt;&lt;span class="bold-green"&gt;kindness&lt;/span&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Yes, kindness. It sounds almost too simple, doesn&amp;rsquo;t it? Want to improve? Be kind. Want to find salvation? Be kind. It&amp;rsquo;s the answer, plain and simple.&lt;/p&gt;
&lt;p&gt;But here&amp;rsquo;s the catch (&lt;span class="italic-green"&gt;the &amp;ldquo;but&amp;rdquo; that makes everything a bit more complicated&lt;/span&gt;): &lt;strong&gt;&lt;span class="bold-calm"&gt;how do we know what true kindness is in any given situation?&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s where things get tricky. For someone like me, who believes in rebirth, I suspect it will take countless lifetimes to fully grasp the nuances of kindness. It&amp;rsquo;s a journey, a continuous learning process.&lt;/p&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Kindness - Path" src="https://www.nacnez.com/images/kindness/kindness.webp"/&gt;
 &lt;p class="caption"&gt;Kindness - The Path to the Path&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id="the-example"&gt;&lt;a href="#the-example" class="header-anchor"&gt;&lt;/a&gt;The Example(!)
&lt;/h2&gt;&lt;p&gt;Let&amp;rsquo;s take an example: the story of Lord Krishna and Shishupala. On the surface, it looks like a simple act of violence. Krishna kills Shishupala. How can that be considered kindness?&lt;/p&gt;
&lt;p&gt;Well, if you delve deeper into the story, you&amp;rsquo;ll find that Krishna&amp;rsquo;s act was one of liberation. By ending Shishupala&amp;rsquo;s life, Krishna freed him (Jaya or Vijaya) from a curse, allowing him to rejoin the divine. It was, in essence, an act of mercy, fulfilling Shishupala&amp;rsquo;s deepest desire.&lt;/p&gt;
&lt;p&gt;Most people, even those present at the time, didn&amp;rsquo;t understand this. And honestly, that&amp;rsquo;s unsurprising. We often struggle to see beyond the surface, to grasp the true nature of kindness in complex situations.&lt;/p&gt;
&lt;p&gt;This brings us to the heart of the matter: figuring out what kindness means is incredibly difficult. It&amp;rsquo;s a lifelong, perhaps multi-lifelong, endeavour. Please don&amp;rsquo;t think that I condone murder based on this example. It is just an extreme example to make my point - knowing what is kindness in every moment is very difficult, and it can also be difficult to follow through with it.&lt;/p&gt;
&lt;h2 id="the-non-answer---a-new-quest"&gt;&lt;a href="#the-non-answer---a-new-quest" class="header-anchor"&gt;&lt;/a&gt;The Non Answer - A new quest
&lt;/h2&gt;&lt;p&gt;There is no real answer in here. All I have done is point you to another quest. To figure out kindness and act with it. So, what do we do? We acknowledge that we need help to navigate this complex path. We ask for guidance. I pray.&lt;/p&gt;
&lt;p&gt;Let us pray for the wisdom to recognize and embody kindness in all our interactions. Let us seek the Lord&amp;rsquo;s guidance as we strive to be kinder to all living beings.&lt;/p&gt;
&lt;p&gt;Lord, only you can guide us. We take refuge in you.&lt;/p&gt;
&lt;p&gt;This connects to ideas I explored in &lt;a class="link" href="https://www.nacnez.com/bg-bhaktiyoga-bhaktha.html" &gt;Bhakthi Yoga - Bhagavad Gita&lt;/a&gt;, particularly the qualities the Gita describes in the Lord&amp;rsquo;s favorite devotee — compassion, forgiveness, and fearlessness are all forms of kindness.&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt;Aum sarvam SriKrishnarpanam astu.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Learning Teaching - Chapter One</title><link>https://www.nacnez.com/teaching-lessons-1.html</link><pubDate>Sun, 17 Dec 2023 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/teaching-lessons-1.html</guid><description>&lt;p&gt;If you follow my blog, you probably know that I am interested in education. One of my specific goals is becoming a teacher. I even feel that I have some talent in the profession😛. In the past, I have attempted some teaching by giving sessions to co-workers (in software development topics - Architecture, TDD etc.), albiet I am not sure about their success. I have also tried my hand at some online course creation (you probably know about &lt;a class="link" href="https://www.nacnez.com/pykidz-basic-course.html" target="_blank" rel="noopener"
 &gt;that one&lt;/a&gt;).&lt;/p&gt;
&lt;h2 id="the-source"&gt;&lt;a href="#the-source" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;The Source&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Given this background, it is clear that I don&amp;rsquo;t have any formal training on teaching. No formal foundation in teaching &amp;amp; developing skills in others. So I decided to invest sometime on it. My search lead me to &lt;a class="link" href="https://www.coursera.org/learn/teaching" target="_blank" rel="noopener"
 &gt;this course in Coursera&lt;/a&gt;. The &lt;em&gt;&lt;span class="bold-green"&gt;Commonwealth Education Trust&lt;/span&gt;&lt;/em&gt; provides a lot of courses on teaching and I thought this could be a starting point to getting trained.&lt;/p&gt;
&lt;p&gt;The course itself is for actual teachers who are practising the craft across the world. I have very limited experience teaching a classroom. Also, the experience I have, has been with fairly older students (not sure if I can call them students, since they are already in a professional setup). But I was interested in understanding how the teaching profession worked. So I started on the course.&lt;/p&gt;
&lt;p&gt;I have now completed &lt;em&gt;2 weeks&lt;/em&gt; of the course. I finished an assignment as part of the course and that made me reflect on some of my learnings in the course (a great idea for an assignment). After some thought, I decided that it will be good to share whatever I have learnt. You may or may not find it useful, but this will help me internalise the ideas. The course has a lot to offer (for anyone interested in the subject). What I cover here are just the top ideas I picked up.&lt;/p&gt;
&lt;h2 id="the-lessons"&gt;&lt;a href="#the-lessons" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;The Lessons&lt;/span&gt;
&lt;/h2&gt;&lt;h3 id="aim-of-teaching"&gt;&lt;a href="#aim-of-teaching" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Aim of Teaching&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;One of the first points made in the course is about the aim of teaching. Let me quote the sentence here:&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-green"&gt;The aim of teaching is not to produce learning but to produce the conditions for learning.&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;div&gt;
 &lt;img alt="Teaching - create the conditions for learning" src="https://www.nacnez.com/images/teaching_lessons/teacher_aim.jpg"/&gt;
 &lt;p class="caption"&gt;The Art of Teaching - Image by &lt;a href="https://pixabay.com/users/peggy_marco-1553824/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1015630"&gt;Peggy und Marco Lachmann-Anke&lt;/a&gt; from &lt;a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1015630"&gt;Pixabay&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Learning is not a simple process of just listening and memorising the ideas said by a teacher (the &lt;em&gt;&lt;span class="bold-green"&gt;&amp;ldquo;teaching&amp;rdquo;&lt;/span&gt;&lt;/em&gt;). It is a multistep, multi-layered process. All learning is social, emotional &amp;amp; intellectual and hence giving a lecture cannot directly create learning. Teaching is more an attempt to create an environment and a set of circumstances which help students learn. It is not a transfer, it is a facilitation. We need to create multiple mechanisms which acts as conditions for learning. Before the course, I did not think of teaching and learning in a holistic sense. It&amp;hellip; made sense!&lt;/p&gt;
&lt;h3 id="the-learners-mind"&gt;&lt;a href="#the-learners-mind" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;The Learner&amp;rsquo;s mind&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The course talks about how the thinking about learning evolves in the mind of the learner - the student. The learner will need to think about:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What do I know about learning? How am I smart?&lt;/li&gt;
&lt;li&gt;What learning mechanisms work best for me? What helps/hinders my learning?&lt;/li&gt;
&lt;li&gt;Who do I learn best with? Where and when do I learn best?&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
 &lt;img alt="Learner's mind is full of questions" src="https://www.nacnez.com/images/teaching_lessons/mind.png"/&gt;
 &lt;p class="caption"&gt;A Learner's mind - Image by &lt;a href="https://pixabay.com/users/gdj-1086657/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3350778"&gt;Gordon Johnson&lt;/a&gt; from &lt;a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=3350778"&gt;Pixabay&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;These questions trigger 2 thoughts in me:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;As a learner &lt;span class="small-italicized-green"&gt;(both my current profession &amp;amp; teaching need learning)&lt;/span&gt;, I need to answer these questions for my own learning process.&lt;/li&gt;
&lt;li&gt;As a teacher, I should try to answer these questions for my learners.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If I can do the second one at an individual level, it would be ideal. But, it may not be practical. In a classroom setting where the teacher and her students have a longer association (in terms of time spent together), individual attention might be possible. Then again, this also depends on how big the class is - teacher to student ratio.&lt;/p&gt;
&lt;p&gt;All said and done, this is another aspect to look at to become a better teacher and learner.&lt;/p&gt;
&lt;h3 id="the-unknown-hinderances"&gt;&lt;a href="#the-unknown-hinderances" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;The Unknown hinderances&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;I am listing out some hinderances in learning. I call these unknown because I was unaware of it myself &lt;span class="small-italicized-green"&gt;(you might already know)&lt;/span&gt;. They are subtle in nature:&lt;/p&gt;
&lt;div&gt;
 &lt;img alt="Hinderances in learning" src="https://www.nacnez.com/images/teaching_lessons/hinderances.jpg"/&gt;
 &lt;p class="caption"&gt;Hinderances in my student's mind - &lt;a href="https://www.pexels.com/photo/traffic-cones-3095695/"&gt;Photo by Ann H&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class="bold-yellow"&gt;Self-doubt &amp;amp; self talk in the learners mind&lt;/span&gt;:
Learners have a lot of things running in their head which can reduce the acquired learning. This is mentioned in the context of kids, but I think it applies to elders too. I can relate to it in my own learning attempts. When a topic become tough, our mind starts doubting our capabilities and starts talking negatively, which hinders the learning further. As a teacher, I need to be aware of this and be able to empathise with learners.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class="bold-yellow"&gt;Inappropriate medium&lt;/span&gt;:
If we just talk through a very visually rich concept, it is obviously a poor medium to convey the message. A crude example is me trying to explain a Picasso or Ravi Varma painting verbally instead of showing a picture. It could be better to use more than one medium (multimedia) to convey lessons. This can also help different kinds of learners (who are partial to different mediums) to grasp the concepts that are explained.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class="bold-yellow"&gt;Misconceptions&lt;/span&gt;:
Many a times, when we are trying to learn a concept that is related to another known concept, our understanding of the new concept is shaped by our understanding of the known concept. But, if we have misconceptions on it, then our new learning suffers. For example if I start learning statistics and have the misconception that average and mean are the only ways to measure central tendencies (which is wrong in more than one way), then I am going to find it harder to properly grasp the concepts of central tendencies.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class="bold-yellow"&gt;Lack of prior knowledge&lt;/span&gt;:
Trying to understand Machine learning without knowing the basics of Statistics is probably going to backfire on us. For any learner trying to learn something, it is important to know the pre-requisites. As a teacher it is imperative on my part to clarify this clearly to the learner.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;span class="bold-yellow"&gt;Peer norms and pressure&lt;/span&gt;:
In a social setting (which is where all learning happens), the effect of peers on the learner is very high. All learners want social validation and want to confirm to peer norms. If the social setting moves the learner away from learning, my efforts as a teacher may not really bear any fruit.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All these have to be seen in the context of individual learners. Every learner might not have all these issues, but they might have different subsets. So it is critical to provide individual attention to the extent possible. I am not sure if this is practical in all situations, but it is the ideal to strive for.&lt;/p&gt;
&lt;h3 id="a-teachinglearning-technique"&gt;&lt;a href="#a-teachinglearning-technique" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;A teaching/learning technique &lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The course introduces a good technique that can be used to teach and learn. It is a 3-step process:&lt;/p&gt;
&lt;div&gt;
 &lt;img alt="Connect, extend and challenge" src="https://www.nacnez.com/images/teaching_lessons/connect.jpg"/&gt;
 &lt;p class="caption"&gt;Connect, extend and challenge - Image by &lt;a href="https://pixabay.com/users/tungnguyen0905-17946924/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=7111755"&gt;Tung Nguyen&lt;/a&gt; from &lt;a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=7111755"&gt;Pixabay&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class="bold-yellow"&gt;Connect&lt;/span&gt; - Connect new information to what they (or you) already know.&lt;/li&gt;
&lt;li&gt;&lt;span class="bold-yellow"&gt;Extend&lt;/span&gt; - Think or explain, how the new concept builds on top of what they (or you) know&lt;/li&gt;
&lt;li&gt;&lt;span class="bold-yellow"&gt;Challenge&lt;/span&gt; - Think or discuss, how it challenges what they (or you) know, think and do&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This kind of learning allows for active inquiry, assimilation and understanding of the material. The learner understands the applicability of the learnings too. It can help break misconceptions which we already have. I plan to apply this to my own learning process. I feel this is very similar to the ideas explained in the &lt;em&gt;&lt;a class="link" href="https://en.wikipedia.org/wiki/Zettelkasten" target="_blank" rel="noopener"
 &gt;Zettelkasten&lt;/a&gt;&lt;/em&gt; method. More on that some other time.&lt;/p&gt;
&lt;h3 id="learning-is-mediated-by-emotional-centers"&gt;&lt;a href="#learning-is-mediated-by-emotional-centers" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Learning is mediated by emotional centers&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;I had some inkling of this idea before. I had noticed that whenever something worth learning has a story attached to it, the recollection of the material is better. The story has to be appealing - have an emotional connect. This applied to my own learning as well as a few times when I had an opportunity to teach others. I did not know that there is a formal understanding that learning has an emotional component. This is new information which &lt;span class="bold-green"&gt;connects and extends&lt;/span&gt; my understanding. Going forward, I should add something in my teaching which will evoke an emotion in the learner.&lt;/p&gt;
&lt;p&gt;The &lt;span class="bold-green"&gt;challenge&lt;/span&gt; I see in doing this, is that I need to figure out a way to control this in a classroom/teaching setting. It should not distract the learner from the core topic and take him to unplanned areas. Venturing into unchartered areas might be good at times, but it could also lead to challenging situations where the core ideas that need to reach the learner get replaced by ancilliary thoughts which may not add the necessary value to the learner. This is something I will have to watch out for and mitigate.&lt;/p&gt;
&lt;h3 id="a-teachable-moment"&gt;&lt;a href="#a-teachable-moment" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt; A teachable moment&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The modules talks about an idea that learning happens at a teachable moment and that teachable moment cannot be pre-determined by the teacher. It varies with different learners. There is a stress on the idea of repeating the learning material from time to time so that a teachable moment occurs for the learner to grasp it.&lt;/p&gt;
&lt;div&gt;
 &lt;img alt="A teachable moment is a learning moment" src="https://www.nacnez.com/images/teaching_lessons/teachable_moment.jpg"/&gt;
 &lt;p class="caption"&gt;A teachable moment is a learning moment - &lt;a href="https://www.pexels.com/photo/cheerful-multiethnic-students-having-high-five-with-teacher-5940841/"&gt;Photo by Kampus Production&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;I have seen many teachers repeating their content, but always felt that doing it, would unnecessarily cause boredom to the listener. Now I understand that this is not true always. The repeating of lessons and ideas is required so that learners get multiple attempts at grasping them. It also explains why many teachers tend to include small sections in their class where they reiterate previously learnt concepts. I also intend to apply this technique down the line. I will ensure that these interludes are brief (and to the point) in nature so that it does not feel overly repetitive &amp;amp; tiresome to the learner.&lt;/p&gt;
&lt;h3 id="learning-by-teaching"&gt;&lt;a href="#learning-by-teaching" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt; Learning by teaching&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;This is something I have observed myself. Any topic which I try to learn takes time. More importantly the nature of the effort I take to learn the topic, matters. When I am learning to teach someone (through a session or through writing), my quality of learning improves by leaps and bounds. I crystallise on thoughts, concepts and ideas better. Also, sessions with learners bring in more questions which makes me think in directions which I had not thought of earlier.&lt;/p&gt;
&lt;p&gt;What I learnt from the module is the fact that this technique could be extended to children or learners. If we provide opportunities for the learners (kids) to teach their peers, it can help them learn better. The challenge I see is that, this could be a big ask for some learners since they might be intimidated by the idea of teaching someone else. I will have to figure out ways to make this attuned to their own comfort. Also, I need to work on getting more learners to participate in the process so that many can benefit from it.&lt;/p&gt;
&lt;h3 id="what-makes-you-say-that"&gt;&lt;a href="#what-makes-you-say-that" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt; &amp;ldquo;What makes you say that?&amp;quot;&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;This idea from the module struck me as a profound one. While I keep focusing on whether the learner(s) have grasped the ideas of the lessons, I have not really delved deep into their thinking and reasoning behind it. Simple questions like &amp;ldquo;What makes you say that?&amp;rdquo;, &amp;ldquo;What do you think you know?&amp;rdquo; pushes me into the realm of the learner&amp;rsquo;s thinking process and helps me understand where they are coming from. It helps me to get deeper into their psyche and ensures that I don&amp;rsquo;t stay at a superficial level.&lt;/p&gt;
&lt;div&gt;
 &lt;img alt="Questioning our thinking leads us to deeper understanding" src="https://www.nacnez.com/images/teaching_lessons/question_thinking.png"/&gt;
 &lt;p class="caption"&gt;Questioning our thinking leads us to deeper understanding - Image by &lt;a href="https://pixabay.com/users/jambulboy-4860762/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2519654"&gt;nugroho dwi hartawan&lt;/a&gt; from &lt;a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2519654"&gt;Pixabay&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;As I think more, I feel that the question &lt;span class="real-bold-green"&gt;&amp;ldquo;What makes me say that?&amp;quot;&lt;/span&gt; is one I should ask myself more often, so that I can delve deeper into my own understanding of topics.&lt;/p&gt;
&lt;h3 id="a-living-curriculum"&gt;&lt;a href="#a-living-curriculum" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt; A living curriculum&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Earlier I have been restricted to the idea of looking at a curriculum as a fixed one. I have come up with curriculums for teaching certain topics in my brief experience as a teacher.&lt;/p&gt;
&lt;p&gt;The idea that the curriculum is a living one that needs to change as per the observations I make, and the needs expressed by learners was new to me. But it makes a lot of sense once I think about it. I will have to figure out how much of this idea I can implement under various circumstances. If I work on my own courses, the curriculum can be changed at my will. Other times I will have to look at innovative ways to keep the curriculum live in spite of the restrictions.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;&lt;a href="#conclusion" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt; Conclusion&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Thes are the top points from the modules which I connected to and was able to extend my thinking and also identify some challenges. These are my first set of lessons in this journey. I hope to learn more from the course (and other courses) and also by sharing it with you all. Please do share your thoughts and comments on this.&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt;Aum sarvam SriKrishnarpanam astu&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Locust statistics in AWS Cloudwatch</title><link>https://www.nacnez.com/locust-cw-plugin.html</link><pubDate>Sun, 22 Oct 2023 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/locust-cw-plugin.html</guid><description>

&lt;div class="admonition tip"&gt;
 &lt;p class="admonition-title"&gt;TL;DR&lt;/p&gt;
 &lt;div class="admonition-content"&gt;Developing &amp;amp; open sourcing a locust plugin that pushes performance test metrics to AWS CloudWatch using locust event hooks and boto3 client.&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;I developed a simple locust plugin and open sourced it. Your questions answered:&lt;/p&gt;
&lt;h2 id="what-are-you-talking-about"&gt;&lt;a href="#what-are-you-talking-about" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;What are you talking about?&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Let me give you some context. I needed a performance test setup for one of our important services in &lt;a href="https://get-simpl.com/"&gt;&lt;img src="https://www.google.com/s2/favicons?domain=https://get-simpl.com" alt=""&gt;Simpl&lt;/a&gt;. My tool of choice for load generation was &lt;a class="link" href="https://locust.io/" target="_blank" rel="noopener"
 &gt;Locust&lt;/a&gt;. I had my reasons and I will discuss that in a different post.&lt;/p&gt;
&lt;h2 id="ok-so-what-why-a-plugin"&gt;&lt;a href="#ok-so-what-why-a-plugin" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Ok, so what? Why a plugin?&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Locust is a great load generation tool. It has been around for a long time, has a good community, fairly performant and supports a lot of features for load generation. But, there was still one problem that needed to be solved for our case - &lt;span class="real-bold-green"&gt;performance test reporting the way we wanted it&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;Locust does allow us to generate reports from the UI, but that approach did not work for us since we were running it in headless mode (part of the CI setup). I also wanted the reports to live for much longer than the duration of test runs since it helps in comparitive analysis. So I decided that we need to send the metric information elsewhere to store and track them. &lt;a class="link" href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html" target="_blank" rel="noopener"
 &gt;AWS Cloudwatch metrics&lt;/a&gt; was a good solution for Simpl&amp;rsquo;s setup - a lot of our metrics go there.&lt;/p&gt;
&lt;p&gt;To make this happen, we needed some software which will take the metrics measured by locust and send it to AWS Cloudwatch. The idea is not a new one. If we look at &lt;a class="link" href="https://github.com/SvenskaSpel/locust-plugins/tree/master/locust_plugins/listeners" target="_blank" rel="noopener"
 &gt;listeners in the locust plugins repo&lt;/a&gt;, we can see solutions for this for other metrics collection systems. Timescale is one such example. I decided that a &lt;code&gt;cloudwatch&lt;/code&gt; listener plugin is the way to go.&lt;/p&gt;
&lt;h2 id="what-does-this-plugin-do"&gt;&lt;a href="#what-does-this-plugin-do" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;What does this plugin do?&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;The plugin is simple. It hooks into the events generated by locust, gathers the data from the event hooks, converts them into metrics and uses a client (&lt;a class="link" href="https://github.com/boto/boto3" target="_blank" rel="noopener"
 &gt;boto3&lt;/a&gt;) to push it into Cloudwatch.&lt;/p&gt;
&lt;h3 id="give-me-more-details-buddy"&gt;&lt;a href="#give-me-more-details-buddy" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Give me more details buddy&amp;hellip;&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Locust provides a set of &lt;a class="link" href="https://docs.locust.io/en/stable/extending-locust.html" target="_blank" rel="noopener"
 &gt;event hooks&lt;/a&gt;, which can be used to track various actions &amp;amp; events of locust.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;cloudwatch&lt;/code&gt; plugin works primarily using 2 event hooks (it actually uses 4, but 2 are important):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When locust initialises, it calls the &lt;code&gt;init&lt;/code&gt; event hook. Our plugin is bootstrapped as part of the event hook. The user of the plugin does this step. Checkout an example for &lt;span class="italic-green"&gt;Application Insights&lt;/span&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;script src="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2FSvenskaSpel%2Flocust-plugins%2Fblob%2F7e46f18330d8d0e8f3bba654371fa1d75ad90ffb%2Fexamples%2Fappinsights_listener_ex.py%23L14-L16&amp;style=atom-one-dark-reasonable&amp;type=code&amp;showBorder=on&amp;showLineNumbers=on&amp;showFileMeta=on&amp;showFullPath=on&amp;showCopy=on"&gt;&lt;/script&gt;
&lt;p&gt;The cloudwatch plugin also does it in similar manner:&lt;/p&gt;
&lt;script src="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2FSvenskaSpel%2Flocust-plugins%2Fblob%2F7e46f18330d8d0e8f3bba654371fa1d75ad90ffb%2Fexamples%2Fcloudwatch_listener_ex.py%23L5-L7&amp;style=atom-one-dark-reasonable&amp;type=code&amp;showBorder=on&amp;showLineNumbers=on&amp;showFileMeta=on&amp;showFullPath=on&amp;showCopy=on"&gt;&lt;/script&gt;
&lt;ul&gt;
&lt;li&gt;When each request is completed (successful or unsuccessful), the &lt;code&gt;request&lt;/code&gt; event hook is called. All the data related to the request like request type, URL of the request, response time etc. are passed as parameters to this call. This is the primary source of data for creating and publishing metrics of a performance test. The plugin registers this event hook when it is instantiated as part of bootstrapping. &lt;span class="italic-green"&gt;Application Insights&lt;/span&gt; example here - &lt;span class="bold-green"&gt;focus on line 26 (last line)&lt;/span&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;script src="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2FSvenskaSpel%2Flocust-plugins%2Fblob%2F7e46f18330d8d0e8f3bba654371fa1d75ad90ffb%2Flocust_plugins%2Flisteners%2Fappinsights.py%23L12-26&amp;style=atom-one-dark-reasonable&amp;type=code&amp;showBorder=on&amp;showLineNumbers=on&amp;showFileMeta=on&amp;showFullPath=on&amp;showCopy=on"&gt;&lt;/script&gt;
&lt;p&gt;The cloudwatch plugin does it this way (&lt;span class="bold-green"&gt;line 168&lt;/span&gt;):&lt;/p&gt;
&lt;script src="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2FSvenskaSpel%2Flocust-plugins%2Fblob%2F7e46f18330d8d0e8f3bba654371fa1d75ad90ffb%2Flocust_plugins%2Flisteners%2Fcloudwatch.py%23L145-L169&amp;style=atom-one-dark-reasonable&amp;type=code&amp;showBorder=on&amp;showLineNumbers=on&amp;showFileMeta=on&amp;showFullPath=on&amp;showCopy=on"&gt;&lt;/script&gt;
&lt;p&gt;Now the data is all available, so all the plugin has to do is to push it to Cloudwatch. Sounds easy right. It is easy, but the plugin does a little trick:&lt;/p&gt;
&lt;p&gt;Instead of just passing the metrics to Cloudwatch at the end of each request, the plugin batches them. Why? Because posting metrics to Cloudwatch costs money at request level. So, instead, it is better to batch them &amp;amp; send it. Cost reduction is always a good idea!😄🤩 Also, this approach optimises the time spent in publishing these metrics.&lt;/p&gt;
&lt;p&gt;The request data is encapsulated into an object &lt;code&gt;RequestResult&lt;/code&gt; which provides methods to convert locust raw data to meaningful Cloudwatch metrics.&lt;/p&gt;
&lt;script src="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2FSvenskaSpel%2Flocust-plugins%2Fblob%2F7e46f18330d8d0e8f3bba654371fa1d75ad90ffb%2Flocust_plugins%2Flisteners%2Fcloudwatch.py%23L13-L29&amp;style=atom-one-dark-reasonable&amp;type=code&amp;showBorder=on&amp;showLineNumbers=on&amp;showFileMeta=on&amp;showFullPath=on&amp;showCopy=on"&gt;&lt;/script&gt;&lt;span class="small-italicized-green"&gt;Dig more using view raw.&lt;/span&gt;
&lt;p&gt;This object is stored in &lt;code&gt;gevent.queue.Queue&lt;/code&gt; - &lt;span class="bold-green"&gt;line 200&lt;/span&gt;.&lt;/p&gt;
&lt;script src="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2FSvenskaSpel%2Flocust-plugins%2Fblob%2F7e46f18330d8d0e8f3bba654371fa1d75ad90ffb%2Flocust_plugins%2Flisteners%2Fcloudwatch.py%23L183-205&amp;style=atom-one-dark-reasonable&amp;type=code&amp;showBorder=on&amp;showLineNumbers=on&amp;showFileMeta=on&amp;showFullPath=on&amp;showCopy=on"&gt;&lt;/script&gt;
&lt;p&gt;Once a batch of requests has been queued in, the plugin will create metrics out of them and send them to cloudwatch in batches &lt;span class="bold-green"&gt;(lines 203-204)&lt;/span&gt;. Two constants govern the limits of this behaviour.&lt;/p&gt;
&lt;script src="https://emgithub.com/embed-v2.js?target=https%3A%2F%2Fgithub.com%2FSvenskaSpel%2Flocust-plugins%2Fblob%2F7e46f18330d8d0e8f3bba654371fa1d75ad90ffb%2Flocust_plugins%2Flisteners%2Fcloudwatch.py%23L153-154&amp;style=atom-one-dark-reasonable&amp;type=code&amp;showBorder=on&amp;showLineNumbers=on&amp;showFileMeta=on&amp;showFullPath=on&amp;showCopy=on"&gt;&lt;/script&gt;
&lt;p&gt;The first one focuses on the limit of actual requests batched. The second one is focused on batch size of metrics sent to Cloudwatch - (one request can lead to more than one metric record - request count, response time, failure count etc.).&lt;/p&gt;
&lt;p&gt;That is it! If you want to look at the code in full, check it &lt;a class="link" href="https://github.com/SvenskaSpel/locust-plugins/blob/master/locust_plugins/listeners/cloudwatch.py" target="_blank" rel="noopener"
 &gt;here&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="where-does-the-plugin-run-now"&gt;&lt;a href="#where-does-the-plugin-run-now" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Where does the plugin run now?&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;The plugin (a version of it) has been running in &lt;a href="https://get-simpl.com/"&gt;&lt;img src="https://www.google.com/s2/favicons?domain=https://get-simpl.com" alt=""&gt;Simpl&lt;/a&gt; perf environments for one of the services for more than a year. More teams/services within Simpl are adopting it now.&lt;/p&gt;
&lt;p&gt;The version which is running inside Simpl has some support for configuring AWS Cloudwatch response time alarms as well. But we have not open sourced that yet (hopefully can do it soon).&lt;/p&gt;
&lt;h2 id="where-is-the-code-now"&gt;&lt;a href="#where-is-the-code-now" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Where is the code now?&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;The &lt;a class="link" href="https://github.com/SvenskaSpel/locust-plugins/pull/147" target="_blank" rel="noopener"
 &gt;pull request&lt;/a&gt; was submitted to the &lt;a class="link" href="https://github.com/SvenskaSpel/locust-plugins" target="_blank" rel="noopener"
 &gt;main github repo&lt;/a&gt;, and it got approved and merged into the master branch. It was released on 18th Oct as part of &lt;a class="link" href="https://github.com/SvenskaSpel/locust-plugins/releases/tag/4.1.0" target="_blank" rel="noopener"
 &gt;Release 4.1.0&lt;/a&gt;. You can track all releases &lt;a class="link" href="https://github.com/SvenskaSpel/locust-plugins/releases" target="_blank" rel="noopener"
 &gt;here&lt;/a&gt;. The locust plugin repo has other useful plugins as well. So you should check it out fully.&lt;/p&gt;
&lt;h2 id="how-did-the-process-of-open-source-contribution-go"&gt;&lt;a href="#how-did-the-process-of-open-source-contribution-go" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;How did the process of open source contribution go?&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;I had thought of contributing this plugin sometime back in January 2023. I raised a &lt;a class="link" href="https://github.com/SvenskaSpel/locust-plugins/issues/111" target="_blank" rel="noopener"
 &gt;Github issue&lt;/a&gt; and discussed with my CTO &lt;a class="link" href="https://www.linkedin.com/in/puneetsingh80/" target="_blank" rel="noopener"
 &gt;Puneet Singh&lt;/a&gt; to get his approval- He was all for it. But before taking the next step, life got in the way and I dropped the ball; the issue got closed.&lt;/p&gt;
&lt;p&gt;I picked it back up in the last couple of weeks and actively started the contribution process. &lt;a class="link" href="https://github.com/cyberw" target="_blank" rel="noopener"
 &gt;Lars Holmberg&lt;/a&gt;, the maintainer of the plugins repo and the main &lt;a class="link" href="https://github.com/locustio/locust" target="_blank" rel="noopener"
 &gt;locust repo&lt;/a&gt; helped me through the entire process.&lt;/p&gt;
&lt;p&gt;We had very useful and timely interactions on the locust Slack channel. Apart from the plugin code, I created an example usage file (referred above) as well as a basic test for the plugin. Lars suggested and helped me with creating these. He also helped me improve the code of the plugin to make it easier to understand and to conform to the policies followed by the locust development process. And in quick time, the plugin code got accepted. It was a swift, constructive and satisfying process.&lt;/p&gt;
&lt;p&gt;I have not made too many open source contributions till date, but this experience makes me want to do a lot more of it. Thanks &lt;a class="link" href="https://twitter.com/cyberw" target="_blank" rel="noopener"
 &gt;Lars Holmberg&lt;/a&gt; for helping with this.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;&lt;a href="#conclusion" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Conclusion&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;This is my first significant open source contribution. I know it is very late in the game, but it better late than never. This experience has made me believe that this process is a worthwhile one.
My journey has only started, and I hope to do more. Also, hopefully this post will encourage you to do more of this and not wait for long like me. Wish you a happy time doing open source!&lt;/p&gt;</description></item><item><title>Why DDATs?</title><link>https://www.nacnez.com/why-ddats.html</link><pubDate>Fri, 22 Sep 2023 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/why-ddats.html</guid><description>&lt;p&gt;You must be thinking: &lt;span class="bold-angry"&gt;&amp;ldquo;Forget Why! What the h*** is DDAT?&amp;quot;&lt;/span&gt;.&lt;/p&gt;
&lt;h2 id="what-is-ddat"&gt;&lt;a href="#what-is-ddat" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;What is DDAT?&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;DDAT is an acronym for &lt;span class="bold-green"&gt;Developer driven automated test&lt;/span&gt;. The term is a mouthful, so I will use the acronym in the rest of the article. &lt;span class="small-italicized-green"&gt;And maybe it will catch on. Wishful thinking!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;DDATs represents tests, which I, as a developer, write to test my own code. These are tests that run automatically and are built by the developer for her/his own need.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I know the next question in your mind - &amp;ldquo;Why not just call it unit tests?&amp;rdquo;. That is the name I also started with. But the term &lt;span class="bold-calm"&gt;Unit testing&lt;/span&gt; is so prevalent, and it means different things for different people. So DDAT is almost like a Unit test, but more flexible to represent what I need from my tests as a developer. Having said that, if you substitute DDAT with Unit test, I am fine with it.&lt;/p&gt;
&lt;p&gt;One of the reasons for not calling DDAT as a unit test is because it may not strictly fit into definitions of Unit tests, as widely held in the community. For example, many unit testing aficionados clearly recommend that unit tests should not be touching databases. There are very good reasons for it (primarily speed of execution) and I agree with those reasons. But what should I do when I am testing the data access layer:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Should I create a unit test which mocks out the actual database from these tests? If I do that, then what am I really testing? What is the value of such a test?&lt;/li&gt;
&lt;li&gt;Should I just ignore tests for the layer? Can I live with that uncertainty?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some people would say that we should just write an &lt;em&gt;&lt;span class="bold-calm"&gt;integration&lt;/span&gt;&lt;/em&gt; test for the data access layer. And hence, I moved to my own term - &lt;span class="bold-green"&gt;DDAT&lt;/span&gt;. DDATs are just good tests which allow developers to write good code in a confident manner. It allows developers to do refactoring with peace of mind. They might be unit tests or integration tests as per the need. But they serve their masters - the developers of the code.&lt;/p&gt;
&lt;h2 id="this-post-is-not-about"&gt;&lt;a href="#this-post-is-not-about" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;This post is not about&amp;hellip;&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;This post is not going to provide a recipe or tutorial for creating DDATs or Unit tests. There are numerous articles on the subject. Down the line, I will write about my own learnings on the topic. But this post is not going to cover it. This post is focused on &lt;em&gt;&lt;span class="bold-angry"&gt;Why DDATs?&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;h2 id="before-why"&gt;&lt;a href="#before-why" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Before Why?&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;I have already established that DDATs are a close cousin to Unit tests. There are a lot of detractors who site the disadvantages of Unit testing. So these qualms apply to DDATs too. Let us look at a few prominent ones:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Extra work and extra time spent on tests.&lt;/li&gt;
&lt;li&gt;Have to keep them &lt;em&gt;well oiled&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;These can give a false sense of security.&lt;/li&gt;
&lt;li&gt;These can be brittle and keep breaking.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;All these are valid concerns, and we need to know them and manage them.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;There are also patrons of Unit tests. What do they say?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Unit tests are great at busting bugs&lt;/li&gt;
&lt;li&gt;They allow fearless refactoring of the code.&lt;/li&gt;
&lt;li&gt;They promote better collaboration between developers by acting as documentation.&lt;/li&gt;
&lt;li&gt;Good tests ensure that debugging issues can be much faster&lt;/li&gt;
&lt;li&gt;Improve the stability of the code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These are true on the whole, but there are things to take care.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Now that, we are finished with thoughts shared by others, let me start with my own why&amp;rsquo;s.&lt;/p&gt;
&lt;h2 id="why-feedback"&gt;&lt;a href="#why-feedback" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Why? Feedback!&lt;/span&gt;
&lt;/h2&gt;&lt;div class="figure"&gt;
 &lt;img alt="Feedback" src="https://www.nacnez.com/images/ddats/ddats_feedback.jpg"/&gt;
 &lt;p class="caption"&gt;DDATs provide feedback to improve! - Image by &lt;a href="https://www.freepik.com/free-psd/infographic-elements-three-dimensional-icon_32455585.htm#query=feedback%20loop&amp;position=27&amp;from_view=search&amp;track=ais"&gt;Freepik&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;!-- &lt;div class="figure"&gt;
 &lt;img alt="Feedback" src="https://upload.wikimedia.org/wikipedia/commons/3/39/Feedback_loop_theory.gif"/&gt;
 &lt;p class="caption"&gt;Need feedback to improve! - De Rosnay, CC BY-SA 4.0 &lt;a href="https://commons.wikimedia.org/wiki/File:Feedback_loop_theory.gif"&gt;via Wikimedia Commons&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt; --&gt;
&lt;p&gt;The cornerstone for creating a system of continuous improvement is &lt;span class="bold-green"&gt;Feedback&lt;/span&gt;. DDATs provide feedback during execution, but it doesn&amp;rsquo;t stop there. While reading DDATs and the code &amp;amp; interfaces that these helped us to create, we get feedback on how the solution has been developed. We get feedback on our code design when we write the tests. The quality and readability of tests also tell us how good our code is.&lt;/p&gt;
&lt;p&gt;To reiterate, feedback is how we create new and better things - ask any person who has built anything of significance. In development, instead of thinking up all the design ideas all the time, we can look at the code and its tests and these can reveal new responsibility owners &amp;amp; roles (as feedback).&lt;/p&gt;
&lt;p&gt;Earlier we get feedback, faster we can improve a system. We can figure out mistakes faster. Debugging is faster with DDATs because it reduces the time you spend on debugging at the first place.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;DDATs are a living feedback system. That is why!&lt;/span&gt;&lt;/p&gt;
&lt;h2 id="why-modularisation"&gt;&lt;a href="#why-modularisation" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Why? Modularisation&lt;/span&gt;
&lt;/h2&gt;&lt;div class="figure"&gt;
 &lt;img alt="Modularisation" src="https://www.nacnez.com/images/ddats/ddats_modularisation.jpg"/&gt;
 &lt;p class="caption"&gt;DDATs modularise to manage. Image by &lt;a href="https://www.freepik.com/free-vector/hand-drawn-flat-design-sql-illustration_22112355.htm#query=software%20modules&amp;position=2&amp;from_view=search&amp;track=ais"&gt;Freepik&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Another aspect about writing DDATs is that we end up modularising our software. Whenever we have code that does a lot of things, it becomes very difficult to test them. So we split them up. For example, we take out stuff which deals with, say, external systems or databases into separate classes so that we can test the business logic without worrying about those concerns.&lt;/p&gt;
&lt;p&gt;DDATs help us to develop a nose for overcrowded (non-cohesive) and coupled code. If we are mocking too many objects to test a &lt;span class="bold-calm"&gt;System Under Test&lt;/span&gt; (SUT), it tells us that we have too many dependencies and the SUT is probably dealing with too many aspects of the system - time to split it up.&lt;/p&gt;
&lt;h2 id="why-independent-development"&gt;&lt;a href="#why-independent-development" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Why? Independent Development&lt;/span&gt;
&lt;/h2&gt;&lt;div class="figure"&gt;
 &lt;img alt="Independent Development" src="https://www.nacnez.com/images/ddats/ddats_independence.jpg"/&gt;
 &lt;p class="caption"&gt;Developing anywhere anytime on our own with DDATs. Photo by &lt;a href="https://www.pexels.com/photo/focused-black-male-freelancer-using-laptop-in-street-cafe-3799115/"&gt;Andrea Piacquadio&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;A very important thing that DDATs enable me to do is, I can test things independently and move forward with development. I don&amp;rsquo;t have to depend on other systems or other people.&lt;/p&gt;
&lt;p&gt;As long as a test can run within the confines of my machine without having to reach a network, I find that test to be useful. It is ok to touch a file or db within your machine (this is my opinion and also why I call it a DDAT). If I am traveling and cannot connect to a network, I am still able to run my DDATs and hence make progress.&lt;/p&gt;
&lt;p&gt;Having this ability gives me a lot of power and convenience. I can confidently move forward and don&amp;rsquo;t need someone to endorse things. Also passing tests act as visible proof of things working instead of just a mental level confidence. Great programmers may not need this, but for a normal developer like me, this is a good thing. As an added bonus, failing tests give me a quick and focused way to debug my code.&lt;/p&gt;
&lt;h2 id="why-a-client-perspective"&gt;&lt;a href="#why-a-client-perspective" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Why? A client perspective&lt;/span&gt;
&lt;/h2&gt;&lt;div class="figure"&gt;
 &lt;img alt="Simple Interface" src="https://www.nacnez.com/images/ddats/ddats_client_perspective.jpg"/&gt;
 &lt;p class="caption"&gt;Simple interface before a complex system - a client's perspective: Image by &lt;a href="https://www.freepik.com/free-photo/delivery-man-with-package-elevator-close-up_12977657.htm#query=looking%20at%20an%20elevator%20interface&amp;position=4&amp;from_view=search&amp;track=ais"&gt;Freepik&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;DDATs test our code by acting as a client to your code. This means that when we write them, we are not really thinking of the implementation, but about how the code is going to be used - the &lt;em&gt;interface&lt;/em&gt;. It might not look like a big deal, but thinking in terms of interfaces &lt;span class="italic-green"&gt; - to think about what to do (instead of how to do) - &lt;/span&gt; is a key technique to creating quality software.&lt;/p&gt;
&lt;p&gt;Seasoned developers do this interface based thinking automatically, but it is always good to have a tool in our box which helps us stay the course. For budding programmers this can be very handy. A more pronounced version of interface-based thinking is observed when you do Test First (TDD) - at least that is my experience. But even if TDD is not your cup of tea, DDATs written after can still be useful for achieving this.&lt;/p&gt;
&lt;h2 id="why-to-conquer-fear"&gt;&lt;a href="#why-to-conquer-fear" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Why? To conquer fear&lt;/span&gt;
&lt;/h2&gt;&lt;div class="figure"&gt;
 &lt;img alt="Conquering fear" src="https://www.nacnez.com/images/ddats/ddats_overcome_fear.jpg"/&gt;
 &lt;p class="caption"&gt;DDATs help conquer fear and make refactoring work: Image by &lt;a href="https://pixabay.com/users/counselling-440107/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1434315"&gt;Ulrike Mai&lt;/a&gt; from &lt;a href="https://pixabay.com//?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=1434315"&gt;Pixabay&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;A good battery of DDATs means that we have protection to refactor our code. This means that I can go ahead and improve the quality of my internals without the fear of breaking something.&lt;/p&gt;
&lt;p&gt;There are too many times (can&amp;rsquo;t keep count), when my code got better by 2x or more after refactoring. Without DDATs, I wouldn&amp;rsquo;t dare touch working code. Just like we need insurance in other aspects of life, DDATs provide us with the same effect when writing code.&lt;/p&gt;
&lt;h2 id="its-not-all-hunkydory"&gt;&lt;a href="#its-not-all-hunkydory" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;It&amp;rsquo;s not all hunkydory!&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;DDATs might offer us a lot of good. But it does not mean that it comes for free. These are work - both in terms of quantity and quality.&lt;/p&gt;
&lt;p&gt;When running against time (which happens in many startups and sometimes other companies too), creating DDATs is extra work. Also, they have to be done with our thinking caps on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;We need to think through scenarios that need to be tested (especially the failure ones - we are particularly bad at it as developers).&lt;/li&gt;
&lt;li&gt;DDATs need to be written in a way that they are not too coupled with implementation details (which makes them brittle and render them useless).&lt;/li&gt;
&lt;li&gt;The tests need to be written with care so that, when they fail, the error messages make sense.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The mental effort is there. There are a bunch more things to keep in mind and that is probably a topic of another post. AND all this effort is not one time, it is something you have keep doing (&lt;em&gt;keeping it well oiled&lt;/em&gt;). So I agree with what others said earlier.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;One thing though - this effort is an investment for getting those benefits mentioned above. Also, if we do this regularly, we will build the mental muscle and the sensitive nose required for becoming better developers!&lt;/span&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Another aspect that comes into play, is the language or platform or ecosystem that you are working in. Some platforms/ecosystems have a very rich set of tools and libraries which allow you to create DDATs with low effort. Others can make it a very laborious and tedious process.&lt;/p&gt;
&lt;p&gt;So when you make choices of tech platforms, testability should be very important criteria in their selection. &lt;a class="link" href="https://www.thoughtworks.com/profiles/n/neal-ford" target="_blank" rel="noopener"
 &gt;Neal Ford&lt;/a&gt; from &lt;a class="link" href="https://www.thoughtworks.com/" target="_blank" rel="noopener"
 &gt;Thoughtworks&lt;/a&gt; categorically mentioned this in one of his talks that I attended long time back. If you are stuck with a primitive platform (in terms of testing capabilities), you might be tempted to skip DDATs. I can&amp;rsquo;t blame you, but in my opinion it is worth sucking it up and doing the work. It will add value.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;DDATs might touch files and call other systems like databases. To me this is useful and manageable in the context of local testing in my machine. Using the same in a Continuous Integration (CI) setup can be a little more challenging.&lt;/p&gt;
&lt;p&gt;Having said that, with technologies like containers (e.g. Docker) this is no longer a deal-breaker. I think with a bit of work, we can get things working in our CI setup as well and that makes DDATs super useful for the entire team. I have done this myself many times and so can you.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;DDATs are not a silver bullet. They are useful to get the benefits like feedback and independent development, but that does not mean, you completely rely on them and forget everything else. For example, if we use DDATs as the only source of feedback and don&amp;rsquo;t have a QA team doing exploratory testing then we are shooting ourselves in the foot. If we become brash about our independence and don&amp;rsquo;t get the code independently tested and reviewed then God save us and our code.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;A word of general caution:&lt;/span&gt;
No form of testing (not just DDATs) will eliminate all bugs. Expecting that is asking for perfection which is an impossible task and a fool&amp;rsquo;s errand.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;&lt;a href="#conclusion" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Conclusion&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;If you have read this article you probably already know what I am going to say next. For others, the gist is:&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;Use DDATs since it provide critical benefits - feedback, independence, modularisation etc. But using them doesn&amp;rsquo;t come cheap. And I would always use these.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt;Aum sarvam SriKrishnarpanam astu.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Pykidz!: My Python Course</title><link>https://www.nacnez.com/pykidz-basic-course.html</link><pubDate>Thu, 10 Aug 2023 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/pykidz-basic-course.html</guid><description>&lt;p&gt;Programming is already a very important skill in today&amp;rsquo;s world. It is not a stretch to say that it is an essential skill. Professionals from all areas want to learn a bit of programming to get an edge. Kids are excited about learning programming and schools are encouraging them by either having it in their course curriculum or as a differentiating aspect of their training. And learning programming using the &lt;strong&gt;&lt;span class="bold-green"&gt;Python&lt;/span&gt;&lt;/strong&gt; language has been all the rage for some time now.&lt;/p&gt;
&lt;p&gt;I have had this thought for some time. So, sometime back, I created a video course (in YouTube) on Python fundamentals, which is aimed at kids. The intention of the course was to give the learner (who has no programming experience), the fundamentals of Python and a basic sense of programming. This post describes the details of what I covered in these video sessions.&lt;/p&gt;
&lt;h2 id="pykidz-course-curriculum"&gt;&lt;a href="#pykidz-course-curriculum" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Pykidz Course Curriculum&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;The course focuses on the following areas:&lt;/p&gt;
&lt;h3 id="1-introduction-to-python"&gt;&lt;a href="#1-introduction-to-python" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;1. Introduction to Python&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;As the name goes, this is an introduction. It starts talking about why one should learn programming, and why learn python.&lt;/p&gt;
&lt;p&gt;Then, I provide a brief idea on how you can install python in your machine. I also talk a bit about python versions. Then I get hands-on and demonstrate the usage of the Python shell.&lt;/p&gt;
&lt;p&gt;This video also covers how we can do calculations (on the shell). You get an understanding of the operators in python. The most important concept covered in this session is variables.&lt;/p&gt;
&lt;p&gt;All of this is covered in a single video! At the end, &lt;span class="bold-angry"&gt;you&lt;/span&gt; will know why programming and python and how to get started.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;First (and only) Video:&lt;/span&gt; &lt;br/&gt;&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/39H5gtdKrbY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Notes &amp;amp; Slides:&lt;/span&gt; &lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-1-introduction/session-1-notes.md" target="_blank" rel="noopener"
 &gt;Pykidz Sessions - Session 1 Notes&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-1-introduction/session-1-slides.pdf" target="_blank" rel="noopener"
 &gt;Slides&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="2-basic-data-types"&gt;&lt;a href="#2-basic-data-types" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;2. Basic Data Types&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The second session / video covers all the basic data types supported by Python. This includes numeric types (integers - &lt;code&gt;int&lt;/code&gt; and floating point numbers - &lt;code&gt;float&lt;/code&gt;), &lt;code&gt;string&lt;/code&gt;s and &lt;code&gt;boolean&lt;/code&gt;s. I demonstrate operations on these different data types to provide a deeper understanding on them (special focus on strings). At the end of the session, &lt;span class="bold-angry"&gt;you&lt;/span&gt; will know the various kinds of data that you can work with in Python.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;First (and only) Video:&lt;/span&gt; &lt;br/&gt;&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/2RUWltA8w5M" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Notes &amp;amp; Slides:&lt;/span&gt; &lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-2-basic_data_types/session-2-notes.md" target="_blank" rel="noopener"
 &gt;Pykidz Sessions - Session 2 Notes&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-2-basic_data_types/session-2-slides.pdf" target="_blank" rel="noopener"
 &gt;Slides&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="3-fully-hands-on-a-get-your-hands-dirty-session"&gt;&lt;a href="#3-fully-hands-on-a-get-your-hands-dirty-session" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;3. Fully Hands on: A Get your hands dirty session!&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;After a couple of sessions that were a little heavy on theory &amp;amp; concepts, I made this session (consisting of 4 videos!) to help learners get their hands dirty with working code. The intention of this session is to get &lt;span class="bold-angry"&gt;you&lt;/span&gt; to write a couple of simple working programs.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The first video is about taking user input interactively in the program. This is useful for writing &lt;em&gt;&lt;span class="bold-green"&gt;dynamic&lt;/span&gt;&lt;/em&gt; programs - they can do things based on what users want.&lt;/li&gt;
&lt;li&gt;The next video is about getting &lt;span class="bold-angry"&gt;you&lt;/span&gt; to know, how you can write code in source files instead of just working with Python shell. The python shell or &lt;span class="bold-green"&gt;REPL&lt;/span&gt; is great for trying things out quickly and learning stuff, but if we want to write programs that we want to keep around and run multiple times, then using source files are the way to go.&lt;/li&gt;
&lt;li&gt;The third video is about using &lt;code&gt;import&lt;/code&gt;s - a way for &lt;span class="bold-angry"&gt;you&lt;/span&gt; use code others have written. I demonstrate this by importing functions from the standard library. This is a key learning.&lt;/li&gt;
&lt;li&gt;After discussing these learnings, I &lt;span class="bold-calm"&gt;build the two programs&lt;/span&gt; which I initially talked about. &lt;span class="bold-angry"&gt;You&lt;/span&gt; can attempt them yourselves before you look at the video and follow along.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;First Video:&lt;/span&gt; &lt;br/&gt;&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/k98yOwyubDg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="small-italicized-green"&gt;NOTE: Links for next videos of the session are present description in this YouTube video.&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Notes &amp;amp; Slides:&lt;/span&gt; &lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-3-fully_hands_on/session-3-notes.md" target="_blank" rel="noopener"
 &gt;Pykidz Sessions - Session 3 Notes&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-3-fully_hands_on/session-3-slides.pdf" target="_blank" rel="noopener"
 &gt;Slides&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/tree/master/sessions/session-3-fully_hands_on/code" target="_blank" rel="noopener"
 &gt;Source Code&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="4-python-lists"&gt;&lt;a href="#4-python-lists" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;4. Python Lists&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;After completing the sessions till now, &lt;span class="bold-angry"&gt;you&lt;/span&gt;, the aspiring developer, have a basic idea on python data types and have written some programs. You know how to take input from the user, and manipulate that data. &lt;span class="bold-angry"&gt;You&lt;/span&gt; have got your feet wet in the world of programming.&lt;/p&gt;
&lt;p&gt;In &lt;em&gt;this&lt;/em&gt; next set of videos, I briefly introduce the different data types that allow us to store more than one item of a given type.&lt;/p&gt;
&lt;p&gt;Let me give a couple of examples: a &lt;span class="bold-green"&gt;collection&lt;/span&gt; or &lt;span class="bold-green"&gt;list&lt;/span&gt; of fruit names or a list of subject scores etc. These session videos (4 again!) focus on a specific collection type called &lt;code&gt;lists&lt;/code&gt;. I demonstrate how &lt;span class="bold-angry"&gt;you&lt;/span&gt; can define them, access elements or items in them, &lt;em&gt;&lt;span class="bold-green"&gt;slice&lt;/span&gt;&lt;/em&gt; them, add/remove items, membership etc. Before I dive into the details of lists, I cover &lt;em&gt;&lt;span class="bold-green"&gt;comparison operators&lt;/span&gt;&lt;/em&gt; in Python (we already covered basic operators in the second session) which are very important for &lt;span class="bold-angry"&gt;you&lt;/span&gt; to know down the line.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;First Video:&lt;/span&gt; &lt;br/&gt;&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/9O2iC1-mnSI" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="small-italicized-green"&gt;NOTE: Links for next videos of the session are present description in this YouTube video.&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Notes &amp;amp; Slides:&lt;/span&gt; &lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-4-python-lists/session-4-notes.md" target="_blank" rel="noopener"
 &gt;Pykidz Sessions - Session 4 Notes&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-4-python-lists/session-4-slides.pdf" target="_blank" rel="noopener"
 &gt;Slides&lt;/a&gt;&lt;br/&gt;&lt;/p&gt;
&lt;h3 id="5-other-composite-types"&gt;&lt;a href="#5-other-composite-types" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;5. Other Composite Types&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;This session content is split into 3 videos. Each covers one of the remaining main collection data types in Python. We start with &lt;code&gt;tuples&lt;/code&gt;, which feel very close to lists but has a very &lt;em&gt;significant&lt;/em&gt; difference. The second video covers &lt;code&gt;dictionaries&lt;/code&gt; which are not just a collection of things, but a collection which is indexed by a key - hence &lt;em&gt;&lt;span class="bold-green"&gt;key value pairs&lt;/span&gt;&lt;/em&gt;. The last one covers &lt;code&gt;sets&lt;/code&gt; which is a collection of unique elements only. For each of these &lt;em&gt;&lt;span class="bold-green"&gt;composite&lt;/span&gt;&lt;/em&gt; or collection data types, I describe typical topics like definition, access, membership etc. I also cover properties &amp;amp; operations that apply to that specific type. By the end of these two sessions, &lt;span class="bold-angry"&gt;you&lt;/span&gt; will know all that is to know about working with collections of data.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;First Video:&lt;/span&gt; &lt;br/&gt;&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/9weVQqLsRt8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="small-italicized-green"&gt;NOTE: Links for next videos of the session are present description in this YouTube video.&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Notes &amp;amp; Slides:&lt;/span&gt; &lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-5-other-composite-types/session-5-notes.md" target="_blank" rel="noopener"
 &gt;Pykidz Sessions - Session 5 Notes&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-5-other-composite-types/session-5-slides.pdf" target="_blank" rel="noopener"
 &gt;Slides&lt;/a&gt;&lt;br/&gt;&lt;/p&gt;
&lt;h3 id="6-conditionals"&gt;&lt;a href="#6-conditionals" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;6. Conditionals&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Most computer programs which we use, demonstrate the ability to do different things in different situations - &lt;em&gt;&lt;span class="bold-green"&gt;decision-making&lt;/span&gt;&lt;/em&gt;. They have an ability to check things and ask for corrections. For this to work, it is important for a program to execute alternative steps depending on situations and &lt;em&gt;&lt;span class="bold-green"&gt;conditions&lt;/span&gt;&lt;/em&gt;. This is where &lt;strong&gt;&lt;span class="bold-green"&gt;conditionals&lt;/span&gt;&lt;/strong&gt; come into play. The session is split into 5 videos. These videos explain the key conditional statements like &lt;code&gt;if&lt;/code&gt;, &lt;code&gt;else&lt;/code&gt;, &lt;code&gt;elif&lt;/code&gt;. But, they don&amp;rsquo;t stop there. Key python concepts like &lt;code&gt;blocks&lt;/code&gt;, the &lt;code&gt;None&lt;/code&gt; keyword, the importance of &lt;em&gt;&lt;span class="bold-green"&gt;whitespace&lt;/span&gt;&lt;/em&gt; are also covered in these videos. I end this session with &lt;span class="bold-calm"&gt;a couple of problems&lt;/span&gt; for &lt;span class="bold-angry"&gt;you&lt;/span&gt; to solve. Now &lt;span class="bold-angry"&gt;you&lt;/span&gt; can make decisions within your code.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;First Video:&lt;/span&gt; &lt;br/&gt;&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/EGKE7o6ZURg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="small-italicized-green"&gt;NOTE: Links for next videos of the session are present description in this YouTube video.&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Notes &amp;amp; Slides:&lt;/span&gt; &lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-6-conditionals/session-6-notes.md" target="_blank" rel="noopener"
 &gt;Pykidz Sessions - Session 6 Notes&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-6-conditionals/session-6-slides.pdf" target="_blank" rel="noopener"
 &gt;Slides&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/tree/master/sessions/session-6-conditionals/code" target="_blank" rel="noopener"
 &gt;Source Code&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="7-loops"&gt;&lt;a href="#7-loops" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;7. Loops&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;We started on the path of controlling flow when we learned conditionals. Another great power of a computer is to be able to repeat a set of tasks as many times as &lt;span class="bold-angry"&gt;you&lt;/span&gt; need without committing any errors. We humans get bored with repetition, so it is a good thing that computers don&amp;rsquo;t. I am sure &lt;span class="bold-angry"&gt;you&lt;/span&gt; will appreciate this!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="bold-green"&gt;Loops&lt;/span&gt;&lt;/strong&gt; in python allow us to do that. A more technical term for looping is iteration. In these set of 15 videos (phew!), I start with explaining the term iteration and then get into its details. After that, &lt;span class="bold-angry"&gt;you&lt;/span&gt; will the basics of &lt;code&gt;while&lt;/code&gt; loops, and dive deep into the &lt;code&gt;break&lt;/code&gt; and &lt;code&gt;continue&lt;/code&gt; statements. I then cover infinite while loops and nested while loops as well.&lt;/p&gt;
&lt;p&gt;After covering while loop in detail, I explain &lt;code&gt;for&lt;/code&gt; loops. I cover iterators, and provide specifics of how the &lt;code&gt;for&lt;/code&gt; loop works. I go through all the related topics just like I did for while loops. Finally, I close the session off by &lt;span class="bold-calm"&gt;giving a problem&lt;/span&gt; for &lt;span class="bold-angry"&gt;you&lt;/span&gt; to solve.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;First Video:&lt;/span&gt; &lt;br/&gt;&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/BhUmH2i4nmE" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="small-italicized-green"&gt;NOTE: Links for next videos of the session are present description in this YouTube video.&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Notes &amp;amp; Slides:&lt;/span&gt; &lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-7-loops/session-7-notes.md" target="_blank" rel="noopener"
 &gt;Pykidz Sessions - Session 7 Notes&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-7-loops/session-7-slides.pdf" target="_blank" rel="noopener"
 &gt;Slides&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/tree/master/sessions/session-7-loops/code" target="_blank" rel="noopener"
 &gt;Source Code&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="8-modular-programming"&gt;&lt;a href="#8-modular-programming" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;8. Modular Programming&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The next key concept to learn is &lt;strong&gt;&lt;span class="bold-green"&gt;modularity&lt;/span&gt;&lt;/strong&gt;. I go over functions &amp;amp; modules in python in a set of 13 videos!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;span class="bold-green"&gt;Functions&lt;/span&gt;&lt;/strong&gt; are a fundamental concept in programming and I cover its importance in good detail. &lt;span class="bold-angry"&gt;You&lt;/span&gt; will understand the mechanics of defining &amp;amp; calling functions. I discuss passing arguments in a lot of detail and then complete this section with an explanation of the &lt;code&gt;return&lt;/code&gt; statement. Now &lt;span class="bold-angry"&gt;you&lt;/span&gt; know to write code that you can reuse again &amp;amp; again in other parts of your code.&lt;/p&gt;
&lt;p&gt;The next set of videos cover python &lt;strong&gt;&lt;span class="bold-green"&gt;modules&lt;/span&gt;&lt;/strong&gt;. It explains the concept first. It then shows how &lt;span class="bold-angry"&gt;you&lt;/span&gt; can create them and use them using &lt;code&gt;import&lt;/code&gt;s. More module details like executing it as a script, reloading it etc. are also discussed. I also have a short mention of python packages.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;First Video:&lt;/span&gt; &lt;br/&gt;&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/Un7gKVsXq_E" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="small-italicized-green"&gt;NOTE: Links for next videos of the session are present description in this YouTube video.&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Notes &amp;amp; Slides:&lt;/span&gt; &lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-8-modular_programming/session-8-notes.md" target="_blank" rel="noopener"
 &gt;Pykidz Sessions - Session 8 Notes&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-8-modular_programming/session-8-slides.pdf" target="_blank" rel="noopener"
 &gt;Slides&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/tree/master/sessions/session-8-modular_programming/code" target="_blank" rel="noopener"
 &gt;Source Code&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="9-exception-handling"&gt;&lt;a href="#9-exception-handling" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;9. Exception Handling&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The last session of the course is about &lt;strong&gt;&lt;span class="bold-green"&gt;Exception Handling&lt;/span&gt;&lt;/strong&gt;. I feel this is an important lesson to learn for all programming beginners. When &lt;span class="bold-angry"&gt;you&lt;/span&gt; do any kind of development, you will hit upon errors. Having an understanding of what they are and how they work is key to progress with the program. It is an essential skill &lt;span class="bold-angry"&gt;you&lt;/span&gt; need to develop as a programmer.&lt;/p&gt;
&lt;p&gt;This session consists of 6 videos. I start off discussing &lt;strong&gt;&lt;span class="bold-green"&gt;syntax errors&lt;/span&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;span class="bold-green"&gt;exceptions&lt;/span&gt;&lt;/strong&gt; - what they are and how they work in real code. I then show &lt;span class="bold-angry"&gt;you&lt;/span&gt; how to &lt;code&gt;raise&lt;/code&gt; exceptions and how the flow works when exceptions happen. After getting a runtime understanding of how exceptions work, I dive deep into the way we would be handling exception in code. I cover an important gotcha (&lt;strong&gt;crime!&lt;/strong&gt;) before closing the session with the &lt;code&gt;finally&lt;/code&gt; block &lt;span class="small-italicized-green"&gt;(pun intended!)&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;First Video:&lt;/span&gt; &lt;br/&gt;&lt;/p&gt;
&lt;iframe width="560" height="315" src="https://www.youtube.com/embed/wJ1W4dtTEhc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen&gt;&lt;/iframe&gt;
&lt;p&gt;&lt;em&gt;&lt;span class="small-italicized-green"&gt;NOTE: Links for next videos of the session are present description in this YouTube video.&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Notes &amp;amp; Slides:&lt;/span&gt; &lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-9-exception_handling/session-9-notes.md" target="_blank" rel="noopener"
 &gt;Pykidz Sessions - Session 9 Notes&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/blob/master/sessions/session-9-exception_handling/session-9-slides.pdf" target="_blank" rel="noopener"
 &gt;Slides&lt;/a&gt;&lt;br/&gt;
&lt;a class="link" href="https://github.com/srininara/pykidz/tree/master/sessions/session-9-exception_handling/code" target="_blank" rel="noopener"
 &gt;Source Code&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="conclusion"&gt;&lt;a href="#conclusion" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Conclusion&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;That is the high level overview of the entire course material. If &lt;span class="bold-angry"&gt;you&lt;/span&gt; want to just get at the entire set of videos of the course, checkout this &lt;span class="bold-angry"&gt;&lt;a class="link" href="https://youtube.com/playlist?list=PLMICa_F_j-IQBifxYmlYwm5-C1bE8Eh4e" target="_blank" rel="noopener"
 &gt;YouTube playlist&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;If &lt;span class="bold-angry"&gt;you&lt;/span&gt; want to get hold of all the notes, slides and source code, they are in &lt;span class="bold-angry"&gt;&lt;a class="link" href="https://github.com/srininara/pykidz" target="_blank" rel="noopener"
 &gt;GitHub&lt;/a&gt;&lt;/span&gt;. You can also download it &lt;span class="bold-angry"&gt;&lt;a class="link" href="https://github.com/srininara/pykidz/archive/refs/heads/master.zip" target="_blank" rel="noopener"
 &gt;here&lt;/a&gt;&lt;/span&gt;.&lt;/p&gt;
&lt;h3 id="my-ulterior-motives"&gt;&lt;a href="#my-ulterior-motives" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt; My ulterior motives&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The initial reason for starting the video course was that it could be useful to my daughter and for other kids like her. These videos have been out there for some time, but I don&amp;rsquo;t think they have reached many people. So I decided that I will write about it here (&lt;span class="small-italicized-green"&gt;I have a small audience here, You&lt;/span&gt;), so that people who visit my blog (you) can take advantage of the course if they need it.&lt;/p&gt;
&lt;p&gt;There is another reason for doing this. This is my first attempt at creating a video based course (learned a bit of video editing - it is hard work!). I am sure that there is a lot of scope for improvement. I want to get more feedback from &lt;span class="bold-angry"&gt;you&lt;/span&gt; on this attempt.&lt;/p&gt;
&lt;p&gt;My daughter has already given one key feedback - my individual videos are too &lt;span class="bold-angry"&gt;long&lt;/span&gt;! I tried to change that in the later sessions, but did not always succeed. There could be a lot more feedback, and I would be very grateful for &lt;span class="bold-angry"&gt;your&lt;/span&gt; help. I hope to make a better version of the course soon. And God willing, I will attempt to make other courses in the future.&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt;Aum sarvam SriKrishnarpanam astu&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Bhakthi Yoga - Bhagavad Gita</title><link>https://www.nacnez.com/bg-bhaktiyoga-bhaktha.html</link><pubDate>Sat, 14 Jan 2023 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/bg-bhaktiyoga-bhaktha.html</guid><description>

&lt;div class="admonition tip"&gt;
 &lt;p class="admonition-title"&gt;TL;DR&lt;/p&gt;
 &lt;div class="admonition-content"&gt;A spiritual code for me to live by.&lt;/div&gt;
&lt;/div&gt;

&lt;div class="figure"&gt;
 &lt;img alt="Geethopadesam" src="https://www.nacnez.com/images/bhakthiYoga/geethopadesam.jpg"/&gt;
 &lt;p class="caption"&gt;Geethopadesam: &lt;a title="IM3847, CC BY-SA 4.0 &amp;lt;https://creativecommons.org/licenses/by-sa/4.0&amp;gt;, via Wikimedia Commons" href="https://commons.wikimedia.org/wiki/File:Arjuna%27s_chariot_in_Geethopadesam_park,_Tirumala_(May_2019)_2.jpg"&gt;IM3847, CC BY-SA 4.0 &lt;https://creativecommons.org/licenses/by-sa/4.0&gt;, via Wikimedia Commons&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id="i-made-the-choice"&gt;&lt;a href="#i-made-the-choice" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;I made the choice&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;I attend a Bhagavad Gita Satsang every Saturday. On that day, &lt;em&gt;Kothai Ji&lt;/em&gt; (our Satsang convener) was asking us to volunteer for RRE (Repeat, Recall, Enjoy) sessions. The choices were the chapters 10, 11 and 12. For some moments, there was silence. I had mentally made my choice, but was hesitating for some reason. As soon as &lt;em&gt;Anand Ji&lt;/em&gt; picked chapter 10, I immediately pounced on chapter 12 (choice verbalized). &lt;em&gt;Ravi Ji&lt;/em&gt; picked the remaining.&lt;/p&gt;
&lt;p&gt;Why did I pounce on Chapter 12?&lt;/p&gt;
&lt;p&gt;At the Satsang, we had just concluded this chapter. The chapter is comparatively a small one. It has only 20 slokas. Ravi Ji commented that, during recitation classes (which he had attended earlier), this chapter is picked up first because of it is simple and musical in nature. &amp;ldquo;It is easy to pick up&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;But these were not the reasons for me to pick the chapter. We had spent six 1 hr sessions on the discussion of this small chapter! It is a fascinating chapter. It is packed with so much relevant information for me that I felt compelled to pick it up for the RRE session.&lt;/p&gt;
&lt;p&gt;I have now finished the RRE session. But I thought I could do more. I am going to talk through the ideas on this chapter in this post. It would be my own understanding of it. Don&amp;rsquo;t worry, I am not going to write a bunch of Sanskrit verses here. I don&amp;rsquo;t have a good handle on the language anyway. My focus is only on the meanings and stories which I heard or read when I went through those slokas.&lt;/p&gt;
&lt;h2 id="how-do-i-render-it"&gt;&lt;a href="#how-do-i-render-it" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;How do I render it?&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;When I was preparing for the RRE session, I was initially not sure how I should conduct it. I could go through it sloka by sloka and tell the meaning and move forward. But the time available was only for an hour or less. I was not sure if I can finish it inside the time with that approach. So I decided to use a different technique.&lt;/p&gt;
&lt;p&gt;I will still go in order of slokas in the chapter, but I split the chapter into three themes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The two paths of worship&lt;/li&gt;
&lt;li&gt;The keys/techniques to reach the Lord&lt;/li&gt;
&lt;li&gt;How does the Lord&amp;rsquo;s favorite devotee &amp;ldquo;look&amp;rdquo; like?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I will cover these themes here. The intention is not to cover every sloka but to focus on these themes.&lt;/p&gt;
&lt;h2 id="the-two-paths-of-worship"&gt;&lt;a href="#the-two-paths-of-worship" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;The Two Paths of Worship&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Arjuna has just seen the Vishwaroopa of the Lord (Chapter 11). While he felt it was awesome, he felt some apprehension too. Lord Krishna had also told him that without devotion, the path to god is not available. So, Arjuna asks a question:&lt;/p&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-green"&gt;Who is the better yogi? One who worships you in your current personal form or the one who worships your unmanifest, unthinkable, immovable, unchanging form?&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;p&gt;When I prepared for the RRE, I came across the names to call these separate &amp;ldquo;versions&amp;rdquo; of God. The personal form is called &lt;span class="bold-green"&gt;&amp;ldquo;Bhagavān&amp;rdquo;&lt;/span&gt; and the unmanifest one is called &amp;ldquo;Brahman&amp;rdquo;. There is a third version called &amp;ldquo;Paramatma&amp;rdquo;, which I don&amp;rsquo;t clearly understand yet. So we will just stick to the two.&lt;/p&gt;
&lt;p&gt;So Arjuna&amp;rsquo;s question is who is the better bhaktha, the one who prays to Bhagavān or the one who prays to the Brahman.&lt;/p&gt;
&lt;p&gt;The Lord replied:&lt;/p&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-green"&gt;The ones who worship me with supreme faith and is always devoted to me, with mind and intellect fixed on me; they are the best yogis. That said, the ones who worship Brahman with complete devotion by staying equanimous, showing firmness of mind and doing good to all beings, they also reach me.&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;p&gt;The takeaway is - both paths work. The &lt;span class="bold-green"&gt;&amp;ldquo;qualities&amp;rdquo;&lt;/span&gt; mentioned for the &lt;em&gt;Brahman&lt;/em&gt; devotee were intriguing.&lt;/p&gt;
&lt;p&gt;The Lord does not stop there though. He goes on to say that &lt;em&gt;&amp;ldquo;the path to Brahman is not easy for embodied beings&amp;rdquo;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I think this is subject to multiple interpretations.&lt;/p&gt;
&lt;p&gt;One interpretation is that humans like us can understand and relate to other beings who have a body. We can wrap our mind around them. The unmanifest, unthinkable Brahman as a concept, is not easy to grasp experientially and to follow on a day-to-day basis. I feel this is important. I think I understand the concept of Brahman intellectually, but I am not even sure of my intellect, and it is also not always in control of me. Sometimes, I am lost in my mind or my body. Understanding or knowing the Brahman in all these dimensions is not easy at all. This is what I felt.&lt;/p&gt;
&lt;p&gt;There was another interpretation I read. The path to realization is a very difficult one. One needs to grace of God to make this possible. But the Brahman is called &amp;ldquo;Nirguna&amp;rdquo; or One WITHOUT attributes, and that means the path to Brahman is tougher because Brahman cannot provide you grace. This is probably controversial, but it appealed to me for some reason.&lt;/p&gt;
&lt;p&gt;One of my references compared the two paths or the two versions of God as a monkey mother and a cat mother. The child (us) of the monkey mother (Brahman) has to hold on to the mother whatever happens. The mother itself will move all over the place but will not offer any help to the infant. The onus is on the infant to cling on. On the other hand, the cat (Bhagavān) holds the kitten with its mouth and takes it wherever it goes. The kitten gets all the help to take the path with the mother. So it is much easier. I felt it was a nice metaphor to understand the difference.&lt;/p&gt;
&lt;p&gt;Overall, the path of Bhakthi to the Brahman is tougher, and it could be beneficial to try an easier path. The easier path is not a cakewalk. It is tough (as you will see soon), but it is easier in comparison.&lt;/p&gt;
&lt;h2 id="keystechniques-to-reaching-the-lord"&gt;&lt;a href="#keystechniques-to-reaching-the-lord" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Keys/techniques to reaching the Lord&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Lord Krishna talks about the 4 techniques to reach Him.&lt;/p&gt;
&lt;h3 id="approach-1"&gt;&lt;a href="#approach-1" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Approach 1&lt;/span&gt;
&lt;/h3&gt;
 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Fix your mind on him and surrender your intellect to him.&amp;quot;&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;p&gt;This means that you are in complete unison with the Lord at all times. You are thinking of Him, and you are feeling Him all the time. There is nothing else. This approach is very difficult if not impossible (at least for me!).&lt;/p&gt;
&lt;h3 id="approach-2"&gt;&lt;a href="#approach-2" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Approach 2&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;So the Lord gives the next technique which is relatively easy.&lt;/p&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Regularly practice meditating on Him through the mind and intellect&amp;rdquo;.&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Meditating on the Lord" src="https://www.nacnez.com/images/bhakthiYoga/meditation.jpg"/&gt;
 &lt;p class="caption"&gt;Meditation: Photo source from &lt;a href="https://www.publicdomainpictures.net/en/free-download.php?image=meditation&amp;id=288318"&gt;PublicDomainPictures.net&lt;/a&gt; taken by Charles Rondeau&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a class="link" href="https://www.publicdomainpictures.net/en/view-image.php?image=288318" target="_blank" rel="noopener"
 &gt;https://www.publicdomainpictures.net/en/view-image.php?image=288318&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This is similar to the previous one, but in this there is an acknowledgement that it is tougher to stay always in unison with God, for a being like me (us?). There is also the concept of practice invoked here. So a regular meditation practice where you are meditating on the Lord, is a good way forward.&lt;/p&gt;
&lt;p&gt;There are no details specified, like how long the practice should be etc. My interpretation is that we start the practice in a small manner. As we practice we get better, and we will be in the meditative state for longer durations.&lt;/p&gt;
&lt;h3 id="approach-3"&gt;&lt;a href="#approach-3" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Approach 3&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;If you are unable to practice meditation, then the next idea is to&lt;/p&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-green"&gt; Believe and think that you are working for Lord Krishna himself.&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;p&gt;This means that, when we are performing actions in our day-to-day life, we do them for the Lord. For example, if you are working to feed your family, you can imagine that you are doing this to feed God&amp;rsquo;s children.&lt;/p&gt;
&lt;p&gt;My own alternate interpretation is that by feeding my family, I am keeping them alive so that they can make progress in their own pursuit to reach God.&lt;/p&gt;
&lt;p&gt;Again, this technique is no cakewalk, but for people like us who have to perform actions daily, this seems a more feasible approach.&lt;/p&gt;
&lt;h3 id="approach-4"&gt;&lt;a href="#approach-4" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Approach 4&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The Lord is kinder and offers a simpler way. If we are not able to even think that we are doing actions for the Lord, then the next approach is&lt;/p&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-green"&gt; Do the action and take the results of the same and offer it to Krishna. &lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;p&gt;This means that I don&amp;rsquo;t have to think of the Lord at the time of action. Once the action is done and the results or consequences (good or bad) come, I offer it to the feet of the Lord.&lt;/p&gt;
&lt;p&gt;This can be offering all your mistakes and misdeeds to the Lord as well. Having said that, I don&amp;rsquo;t think this entitles us do horrible things and then put the blame on God. It means, we realize that the outcomes of our actions (even good ones) are not in our control, and we readily offer them to the Lord so that we can be at peace.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;When I look at these 4 techniques, I felt that they are steps in a progression. If you are able to first give up the fruits of action to the Lord, then slowly I expect to be able to start thinking of the actions as being done for the Lord himself. Given that my mind is fixed in the lord when I do actions, that leads me to a practice of meditation even when I am working. When the meditation practice reach its zenith then I am completely immersed in the Lord through mind and intellect. A progression!&lt;/p&gt;
&lt;p&gt;My own path has been to attempt all the last 3 techniques whenever &amp;amp; wherever possible. I have set up a reasonably regular cadence of meditation albeit for a very short time. I try to regularly remind myself that I am doing God&amp;rsquo;s work before I start something(not very successful in this). The giving up the fruits of the action is tougher because of the deep-seated &lt;em&gt;Ahankar&lt;/em&gt; in me. The hope I have is that, the regular practice will help in all these counts.&lt;/p&gt;
&lt;p&gt;The next section is about qualities of a true Bhaktha. This is a long one but it is my favorite.&lt;/p&gt;
&lt;h2 id="lords-favorite-devotee"&gt;&lt;a href="#lords-favorite-devotee" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Lord&amp;rsquo;s favorite devotee&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Lord Krishna discusses the qualities of his favorite devotees in 7 slokas (12.13-19). I am classifying these qualities into two aspects:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;How the favorite Bhaktha thinks internally or looks inward?&lt;/li&gt;
&lt;li&gt;How the Lord&amp;rsquo;s favorite Bhaktha treats others?&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="internal-thinking"&gt;&lt;a href="#internal-thinking" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Internal thinking&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The Lord talks about many qualities about mindset of his favorite bhaktha. I am going to enumerate some key ones:&lt;/p&gt;
&lt;h4 id="equanimity--equipoise"&gt;&lt;a href="#equanimity--equipoise" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Equanimity &amp;amp; Equipoise&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;A beloved bhaktha of the Lord will act with equanimity in both joy and sorrow. She doesn&amp;rsquo;t get too excited or exuberant when she is happy. Similarly, when it is a time of sorrow, he doesn&amp;rsquo;t get downright sad and weepy. Visually speaking, true bhakthas are able to look at both with a slight smile in their lips.&lt;/p&gt;
&lt;p&gt;I know this is easier said than done. During our Gita session, Kothai ji reminded us (paraphrased by me) &amp;ldquo;One cannot be perfect on this. The important thing is to reduce the &lt;span class="italic-green"&gt;frequency&lt;/span&gt; (F) of the highs and lows, reduce &lt;span class="italic-green"&gt;intensity&lt;/span&gt; (I) of these moments and reduce &lt;span class="italic-green"&gt;recovery time&lt;/span&gt; (R) (come back to normal state)&amp;rdquo;. I created an acronym for this - FIR. So reduce FIR. This needs practice (Abhyasa).&lt;/p&gt;

&lt;div class="article-section"&gt;
 &lt;div class="figure align-right"&gt;
 &lt;img alt="Ramakrishna Paramahamsa" src="https://www.nacnez.com/images/bhakthiYoga/ramakrishna.jpg"/&gt;
 &lt;p class="caption"&gt;Ramakrishna &lt;a href="https://commons.wikimedia.org/wiki/File:Ramakrishna_Marble_Statue.jpg"&gt;CC BY-SA 3.0 via Wikimedia Commons&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;A story of Ramakrishna is apt for this point of dealing with sorrow or handling tribulations.&lt;/p&gt;
&lt;p&gt;Ramakrishna was a great bhaktha of &lt;span class="bold-calm"&gt;Goddess Kaali&lt;/span&gt;. There was a time when he was diagnosed with cancer!&lt;/p&gt;
&lt;p&gt;His followers loved him and did not want to lose him. So they got together and asked him to pray to Goddess Kaali to cure it.&lt;/p&gt;
&lt;p&gt;Ramakrishna replied with a smile &amp;ldquo;Right now, my mind is full of the devotion for the Goddess. Why would I want to change it to think about cancer?&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;For Ramakrishna Paramahamsa, the ailment of cancer did not cause trouble. He was too immersed in Bhakthi to care about it.
&lt;br/&gt;
&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;This level of Bhakthi is not easy to achieve but once you get there, there is no looking back.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;The related idea here is that a beloved bhaktha is not worried or tensed about anything. This does not mean that they don&amp;rsquo;t care about people or don&amp;rsquo;t have compassion. It does not mean that they are apathetic - that will be a &lt;span class="bold-angry"&gt;tamasic&lt;/span&gt; quality.&lt;/p&gt;
&lt;p&gt;I think this state of a calm mind comes from the fact that you realize that results are not in your hand, and you can only do your actions in the best way possible (&amp;ldquo;Nishkama Karma&amp;rdquo;). So as an aspiring beloved bhaktha, my interpretation is, I will be receptive to feedback as a way to improve my actions and not as a way to characterize my ego (as good or bad). A beloved bhaktha has renounced both good and evil and laid it at the feet of the Lord.&lt;/p&gt;
&lt;p&gt;The Lord also talks about being alike to friend and foe. To me, this means that we stop looking at people as foes. If all are friends then you will treat them the same way. This is not easy for mere mortals like me. In the Satsang, Guruji&amp;rsquo;s words said &amp;ldquo;Whomever you consider as enemy &lt;span class="small-italicized-green"&gt;(they have done some actual harm to you - my words)&lt;/span&gt;, start thinking and praying for their wellbeing on a daily basis&amp;rdquo;. The idea is to actively replace feelings of hatred with feelings of love and care. This feels like &amp;ldquo;active forgiving&amp;rdquo; (my term) and will lead me to a better path to treat them also as my friend.&lt;/p&gt;
&lt;p&gt;Guruji mentions the same idea to be used for people we are jealous of (they have not done any actual harm but our ego perceives so, because of jealousy). Why would these people need forgiveness from us? It did not make sense to me. So, I changed its meaning to think that this act is a chance to forgive ourselves and get into a better/calmer state of mind.&lt;/p&gt;
&lt;p&gt;The Lord talks about being alike to honor and dishonor. In my own petty and silly ways, I have had these feelings of loss of honor, and they have taken me for a spin. If I can treat them with equipoise then I will be closer to the Lord. Guruji gives the example of the &amp;ldquo;Bahu&amp;rdquo; in serials who goes through so many bad situations which causes her to be dishonored, but finally getting vindicated at the end. This was a fun example and very relatable. Having said that I felt, if I am truly equipoised, vindication is not a feeling I will need or even identify with. Doing this is not easy and again practice is key.&lt;/p&gt;
&lt;h4 id="contentment"&gt;&lt;a href="#contentment" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Contentment&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;The Lord says that his dearest bhakthas are contended. They are contended with what comes their way. They don&amp;rsquo;t have wants - they want nothing. He expresses this multiple times in the slokas.&lt;/p&gt;
&lt;p&gt;We discussed this in the Satsang. Kothai ji came up with an acronym here - ZCC - Zero Cribs and Complaints. This means that whatever life throws at you, you move forward without cribbing or complaining about it or about others. I feel that this is about reducing (if not eliminating) expectations. I also feel this is related to our ego.&lt;/p&gt;
&lt;p&gt;An example which came to my mind was about our own need to impress people. Whether I am giving a talk at our office or attending a Gita session, my mind wants to do actions which impress people and make them think that I am good. I can do whatever actions I want, but my expectation of people getting impressed by them is not guaranteed. So I get disappointed. If I am able to just give my talk with my utmost ability and welcome whatever feedback comes out of it with the right mindset then I have a chance of feeling contended. Else I will always feel disappointed.&lt;/p&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Sant Kabir" src="https://www.nacnez.com/images/bhakthiYoga/Kabir_Ji.jpg"/&gt;
 &lt;p class="caption"&gt;Sant Kabir &lt;a href="https://commons.wikimedia.org/wiki/File:Kabir_Ji.jpg"&gt;License - Devendra Jaiswal, CC BY-SA 4.0 via Wikimedia Commons&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The other related aspect is reducing our needs for things, which can lead to contentment. This does not mean that we avoid basic needs. There is a &lt;em&gt;doha&lt;/em&gt; from &lt;span class=”bold-calm”&gt;Sant Kabir&lt;/span&gt; which expresses this nicely:&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class=”bold-green”&gt;mālik itanā dījiye, jāme kuṭumba samāya&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class=”bold-green”&gt;maiṅ bhī bhūkhā na rahūñ, sādhu na bhūkhā jāya&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;“O Lord, give me just enough for the bare maintenance of my family’s bodily needs, and for giving alms to the sadhu who comes to my door.”&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;p&gt;This is also difficult to do, but we can slowly make progress. My tryst with minimalism (see &lt;a class="link" href="https://www.nacnez.com/minimal-first-brushstroke.html" target="_blank" rel="noopener"
 &gt;my earlier blog post&lt;/a&gt;) also talks about reducing material needs. Hopefully, I will make progress on this and be on the way to become a good bhaktha to the Lord.&lt;/p&gt;
&lt;p&gt;I have also started a habit of maintaining a Gratitude dairy. This was suggested in the Satsang and I have also heard about it in a lot of other places. I have started this practice to identify the many good things that are happening to me, which can lead me to contentment.&lt;/p&gt;
&lt;h4 id="subduing-the-mind"&gt;&lt;a href="#subduing-the-mind" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Subduing the mind&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;The Lord mentions subduing the mind or controlling the mind many times. I think this as being self-disciplined. As part of the Guruji&amp;rsquo;s commentary and the Satsang&amp;rsquo;s discussion, we discussed pushing or training the mind to do the opposite of what it wants to do. Few examples :&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Take a cold water bath in the winter.&lt;/li&gt;
&lt;li&gt;Start watching a serial or a movie and drop it abruptly.&lt;/li&gt;
&lt;li&gt;Not checking slack in the morning (my addition).&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Cold water shower to subdue the mind" src="https://www.nacnez.com/images/bhakthiYoga/cold_water_bath.jpg"/&gt;
 &lt;p class="caption"&gt;Subduing the mind - Take a cold shower: Photo from &lt;a href="https://pxhere.com/en/photo/1159600?utm_content=clipUser&amp;utm_medium=referral&amp;utm_source=pxhere"&gt;PxHere&lt;/a&gt;
 &lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;It is like working a muscle. You keep training it regularly to strengthen it. The mind is like a muscle. This has come out of scientific research too.&lt;/p&gt;
&lt;p&gt;The practice of meditation where I am focusing on the breath is a way to train my mind. The mind still wanders, but I am training it to focus on the breath on a regular basis. I think I am making only a small amount of progress, but since I am in it for my lifetime, I am ok with the speed.&lt;/p&gt;
&lt;p&gt;In the context of being a beloved Bhaktha, quietening the mind when needed, is an important trait.&lt;/p&gt;
&lt;h4 id="firm-resolve-on-the-lord"&gt;&lt;a href="#firm-resolve-on-the-lord" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Firm resolve on the Lord&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;Lord Krishna says his true Bhaktha is firmly resolute. This resolve or conviction is key to help her tide over the difficulties that will come in the path she has chosen.&lt;/p&gt;
&lt;p&gt;Also, our conviction helps us to convince others without forcing them. Who am I talking about? I am talking about my family members or friends who I think will benefit by taking this journey. My firm resolve will demonstrate to them how this path can make someone strong. That can lead them to chose the path without any gifted salesmanship from us.&lt;/p&gt;
&lt;p&gt;Firm resolve is not demonstrated by words. Actions are required. That said, we need to understand that words are a starting point. Good words lead to good thoughts and good thoughts lead to good actions. Eventually, our actions speak louder than words, so if you want to show conviction, then act with conviction.&lt;/p&gt;
&lt;h4 id="fearless"&gt;&lt;a href="#fearless" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Fearless&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;Lord Narayana says my beloved bhakthas are fearless. How to make this happen? I think this is possible if we have a lack of desire and if we are not attached to things or even people.&lt;/p&gt;
&lt;p&gt;This is a tall order. I might be able to cultivate detachment from things with a lot of effort but being detached from the people I love is going to be difficult - because of my ego. Detachment does not actually mean that you stop loving them. It means that you love them without thinking that they belong to you. In a detached state, I care about their happiness and wish them well without thinking that I should be the reason for the same.&lt;/p&gt;
&lt;p&gt;There is a saying that I have heard - &amp;ldquo;If it is yours, release it, and it will come back to you&amp;rdquo;. This sounds nice, but if you are really detached then you realize that nothing is really yours, and therefore it does not matter if it comes back to you. This is not easy, but it is an ideal state worth striving for.&lt;/p&gt;
&lt;p&gt;If I make my mind like this then fear vanishes. If I feel that the bike I am using is not truly yours then I will not be worried about it after parking it somewhere. I say this because I do worry about this sometimes!😟 But if I can practice thinking like this then I can get to a true state of fearlessness.&lt;/p&gt;
&lt;h4 id="pure-minded"&gt;&lt;a href="#pure-minded" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Pure-minded&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;A true Bhaktha of Bhagavān is pure minded. The Lord talks about both outer (take a regular bath man! 🤦‍♀️) and inner purity.&lt;/p&gt;
&lt;p&gt;I am focused on the mind related purity because it is a lot harder to achieve that. Our mind is made impure of different kinds of thoughts. Thoughts related to our ego, envy, anger, greed and lust come to us very easily. Most times we don&amp;rsquo;t even realize that we are caught in these thoughts since they pervade our entire consciousness.&lt;/p&gt;
&lt;p&gt;The first step to changing this is to watch our thoughts. If I build some mindfulness and start watching my thoughts, I will at least become aware when certain kind of thought takes hold of me. One can be the judge of what kind of thoughts these are and take corresponding action.&lt;/p&gt;
&lt;p&gt;Once you are aware, you can take steps to improve your thoughts. And as good thoughts are the way to good actions, we can make a difference to the world.&lt;/p&gt;
&lt;p&gt;Another trick to having good thoughts is to read or listen to life and stories of good people or saints. This will lead us to better state of mind - purity.&lt;/p&gt;
&lt;h4 id="skillful"&gt;&lt;a href="#skillful" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Skillful&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;The Lord says, &amp;ldquo;My dearest Bhaktha is skillful&amp;rdquo;. I did not understand this initially. What has skill got to do with Bhakthi? After we discussed this in the Satsang, and after I thought a little more, an idea came to me. If I think that I am doing God&amp;rsquo;s work and show great dedication to it, then I automatically do a very good job at it. I am attentive to detail and want to persevere so that I do the best work for the Lord. If I do my work like this then I become skillful in it. So it became obvious that a true bhaktha is skillful.&lt;/p&gt;
&lt;p&gt;A related thought is being a &lt;span class="bold-green"&gt;&amp;ldquo;nimmitha&amp;rdquo;&lt;/span&gt;. This means being a tool for the Lord. Once you are just acting as a tool, then Lord will do the work through you and the work will be skillfully done. I was reminded of the movie &lt;a class="link" href="" &gt;Kantara&lt;/a&gt;. When the hero becomes a tool of the Lord, he is bestowed with so much strength that no villian is able to stand in front of him. He is just the medium, the Lord is actually doing the work.&lt;/p&gt;
&lt;h4 id="contemplative"&gt;&lt;a href="#contemplative" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Contemplative&lt;/span&gt;
&lt;/h4&gt;&lt;div class="figure align-right"&gt;
 &lt;img alt="Contemplate" src="https://www.nacnez.com/images/bhakthiYoga/contemplate.jpg"/&gt;
 &lt;p class="caption"&gt;Contemplate: Photo by 
 &lt;a href="https://unsplash.com/@verenayunita?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Verena Yunita Yapi&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/l2MrMLKKi6I?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;
 &lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Krishna mentions in one of the slokas that his dearest bhaktha is contemplative. This is another one which I did not find easy to comprehend. I can only talk about it through personal experience. Whenever I have been a contemplative mood, there is the feeling of a deeper force working in me. The mind is calmer and is able to wrangle through tough questions. Instead of the cacophony of discussions, a few hours of contemplative thought has led me to get better insights on anything. It could be even work projects. That is the way I understand this.&lt;/p&gt;
&lt;h4 id="remove-sense-of-ownership"&gt;&lt;a href="#remove-sense-of-ownership" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Remove sense of ownership&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;The Lord says that my beloved bhakthas have given up the sense of ownership. We know that, all things including our body have to be left behind when one dies. When I look at the world like this, the idea that I own houses or vehicles etc. doesn&amp;rsquo;t make much sense. But we always live with the thought that whatever we have will always be with us (including our loved ones) and our body itself is not something which will be destroyed since we own it.&lt;/p&gt;
&lt;p&gt;If we are able to remove our sense of ownership of these things, then we have diminished our ego, and we will surely reach a better state.&lt;/p&gt;
&lt;h4 id="unattached-to-home"&gt;&lt;a href="#unattached-to-home" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Unattached to Home&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;In the 18th Sloka, Krishna says that my favorite Bhaktha is not attached to their home. The way I interpreted it is that such a bhaktha is NOT beholden to any of their identities. They don&amp;rsquo;t hold on to their caste or religion or language or any other form of identity. They realize that they are part of the grand union of the lord and hence identifying themselves with a particular aspect does not make sense.&lt;/p&gt;
&lt;p&gt;Also, the life we live and the situations we are born into are so arbitrary (from the perspective of identity) that there is no point in being attached to them. Having said that, this is not easy to do. Throughout our life we have been attached to our family name (there are people who do honor killings for this). We are also identified with our language or our country. While it is ok to show love to your country men or your community men, it does not make sense to hate others. The concept of us and them is meaningless to a true bhaktha. Since all of us come from the Lord, there is only us and no them. The whole world is our kin.&lt;/p&gt;
&lt;p&gt;Here ends my discussion on Bhaktha&amp;rsquo;s inner state.&lt;/p&gt;
&lt;h3 id="treating-others"&gt;&lt;a href="#treating-others" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Treating others&lt;/span&gt;
&lt;/h3&gt;&lt;h4 id="never-have-malice"&gt;&lt;a href="#never-have-malice" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Never have malice&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;One of the first things the Lord says about his beloved Bhaktha is that they don&amp;rsquo;t show malice to other people or even other life forms. This means that I don&amp;rsquo;t carry malevolent thoughts towards other people or other living things.&lt;/p&gt;
&lt;p&gt;My thoughts went to two places. With respect to living beings - mosquitos. I am not sure about you, but I have sometimes taken it as my life goal to eradicate all mosquitoes in my bedroom. I have gone on sprees trying to smash them to smithereens. After listening to this, I am not sure if this was a good thing. Why do I need to actively look for mosquitoes and kill them? It felt like I am doing it out of malice. It is different to kill a mosquito that is biting me, but my mind, actively trying to seek and kill them feels wrong. Even using a mosquito repellant seems better than to actively seek and kill. The intention is mellower, and it is to drive them away so that they don&amp;rsquo;t cause harm instead of actively causing harm to them. I will try to change this in my mind.&lt;/p&gt;
&lt;p&gt;Next is on people. Given my big fat ego, I sometimes harbor malicious thoughts about even my family members or co-workers. If my daughter does not listen to my advice on studying, a malicious thought about bad results does come to my mind. Similarly, if a co-worker comes with a counter-proposal at work, I think about how I want it to fail. Both are these are driven by my ego and my want to be correct. If I can suppress this, then there is a chance for me to be benevolent.&lt;/p&gt;
&lt;p&gt;While the Lord wants us to be not malicious to all in the world, I think we can start with our family and friends. If I can treat my family, friends and co-workers in a good way then I go a long way towards showing no malice to the world.&lt;/p&gt;
&lt;h4 id="be-friendly-and-compassionate"&gt;&lt;a href="#be-friendly-and-compassionate" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Be Friendly and Compassionate&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;The Lord says that we should be friendly to all. My &lt;span class="bold-angry"&gt;&amp;ldquo;kutharka bhuddhi&amp;rdquo;&lt;/span&gt; immediately asks if Krishna was friendly to Duriyodhana. But when I think more deeply about it, I remember a lot of situations where the Lord actually tries to push Duriyodhana in the right direction but without success. When you try to be friend to all, it does not mean that they will reciprocate. But your own feelings to them should be friendly.&lt;/p&gt;
&lt;p&gt;Similarly, being compassionate applies to all. Compassion shouldn&amp;rsquo;t be restricted to specific people and identities. That said it is difficult to show compassion to people who you are not even meeting. If I can show compassion towards the people I interact daily then I think I fulfill this aspect of a true Bhaktha.&lt;/p&gt;
&lt;p&gt;Also, whether it comes to being friendly or showing compassion, we need to do it without feeling proud about it or wanting recognition for the same. That will just feed into our ego and build expectations in us. We need to show compassion like an old man planting mango saplings. He will not be able to reap the fruits (literally) of it, but he does it without any expectation of returns.&lt;/p&gt;
&lt;p&gt;One aspect that Guruji brought up here was the need to be practical. We can&amp;rsquo;t really show compassion to terrorists. I am split about this. While I agree with Guruji that this is practical and sensible, I also wonder if deep compassion has the capability of making even a terrorist change. I am not sure, but compassion is not easy anyway, so let me start with showing it at least to my near and dear ones.&lt;/p&gt;
&lt;h4 id="forgiving"&gt;&lt;a href="#forgiving" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Forgiving&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;Forgiveness is a virtue that a true Bhaktha has according to Lord Krishna. I have covered this a little in the previous section. It is important for us to forgive our enemies actively and not just forget about them. Actively send them loving wishes will ensure that our own mind is in a better state.&lt;/p&gt;
&lt;p&gt;Forgiveness does not mean that all murderers need to be forgiven. There will still be need for punishment, but this act is done for betterment of society and not to inflict our hate and anger on others. It is done with a sense of duty. An executioner or even a judge is handing out punishment to an offender not because she hates them, but because she needs to uphold his duty. That mentality is required to practice forgiveness.&lt;/p&gt;
&lt;h4 id="dont-annoy-and-dont-get-annoyed"&gt;&lt;a href="#dont-annoy-and-dont-get-annoyed" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Don&amp;rsquo;t annoy and don&amp;rsquo;t get annoyed&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;In our day-to-day life, we don&amp;rsquo;t get angry all the time. But we do get annoyed. While this seems innocuous to us, this feeling builds on to increase our ego (this is for sure) and will potentially lead to anger at some point in time. And the thing is that we get annoyed on very small things and with even our loved ones.&lt;/p&gt;
&lt;p&gt;We sometimes get annoyed by the actions of our children or the actions of the people who work for us. It is important to treat them well and with respect, so that we don&amp;rsquo;t give wings to these stupid thoughts of annoyance. Respect is a good antidote. That said, if your servant is not doing his job well, it is our duty to set things straight. Taking action respectfully to get better work, but without getting annoyed is good. It will lead to better outcomes for all involved.&lt;/p&gt;
&lt;p&gt;A completely different aspect is that we could have habits that cause annoyance for others. I have this bad habit of making weird noises with my closed mouth. It annoys everyone in my family. Sometimes I do it purposely for fun but most times this happens without me being conscious. A little more mindfulness can help in trimming this out.&lt;/p&gt;
&lt;p&gt;We also annoy our children by giving them advice on a regular basis. We think that it is for their good, but it only leads to sense of annoyance for them. Especially for kids who are in their late teens, who are trying to figure out their personality, this kind of constant advice is very off-putting. Guruji&amp;rsquo;s says that it is criminal to offer corrections to anyone above 16 years old, unless they ask for it. I am trying to digest this and incorporate it in my life. That is the only way for me to ensure that my daughter will be willing to seek me out for help when needed, and the help I provide will reach her without causing annoyance.&lt;/p&gt;

&lt;div class="article-section"&gt;
 &lt;div class="figure"&gt;
 &lt;img alt="Sant Eknath" src="https://www.nacnez.com/images/bhakthiYoga/Sant_Eknath.jpg"/&gt;
 &lt;p class="caption"&gt;Sant Eknath &lt;a href="https://en.wikipedia.org/wiki/File:Eknath_2003_stamp_of_India.jpg"&gt;licensed under the Government Open Data License - India (GODL)&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;There is a story of a saint (&lt;a class="link" href="https://en.wikipedia.org/wiki/Eknath" target="_blank" rel="noopener"
 &gt;Sant Eknath&lt;/a&gt;) who used to take bath in Godavari daily before his prayers. One person in his village was not fond of him. He decided to express this by spitting on the saint as soon as he came out from the bath. The saint returned to Godavari to take bath again. On his way back, this wily person spit on him again. The saint returned again to take bath only to be spat on again. This happened for 108 times. The wily person was flabbergasted and finally fell on the feet of the saint asking for forgiveness. The saint lifted the man with a smile and thanked him for giving the opportunity to bathe in the Godavari so many times to purify himself.&lt;/p&gt;
&lt;p&gt;This is a story that demonstrates a lot of qualities of a true Bhaktha. This level of maturity is very difficult to achieve for me. That said, the story acts as an inspiration and as a reminder for the work that needs to be done.&lt;/p&gt;

&lt;/div&gt;

&lt;h4 id="impartial"&gt;&lt;a href="#impartial" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Impartial&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;The Lord says that we need to treat all people impartially and based on their merit. While this is a fairly straightforward to understand, we need to take care that we determine merit without the lens of our own selfishness or ego. If we forget that, the meaning of impartial gets completely lost.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;&lt;a href="#conclusion" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Conclusion&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;I have explained the Bhakthi yoga chapter of the Bhagavad Gita in as much detail I can. Couple of last thoughts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Though this chapter of the Gita is said to be a small one, I felt that it is profound and filled with insights and pointers for me that it is difficult to take it all in. So I decided to read this chapter on a daily basis. The Guruji of the Satsang has also suggested the same idea (I realized it later on). So I have started doing this on a reasonably regular basis in an audio form. I am not sure if it will work for others, but I feel that this can add value to me.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I had earlier asked you to take note of the qualities of Bhakthas of Brahman as specified by Gita in the first section. If you notice the qualities elaborated in the true bhaktha section above, you will realize that these are succinctly described by the same verse earlier. So it does not matter whether you are worshiping the manifested Bhagavān or the un-manifested Brahman, the qualities of the Bhaktha are similar in nature.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With this thought I will leave you to contemplate and digest this. If these ideas connect with you, I&amp;rsquo;ve continued this thread in &lt;a class="link" href="https://www.nacnez.com/the-answer.html" &gt;Our Ultimate Quest: The Simple (Yet Complex) Answer&lt;/a&gt; — a shorter reflection on kindness as the core of the spiritual path.&lt;/p&gt;
&lt;h2 id="references"&gt;&lt;a href="#references" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;References&lt;/span&gt;
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;Jivanmuktas &amp;lsquo;Amazing Simple Gita&amp;rsquo; - The Gita book we use in the Satsang&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.holy-bhagavad-gita.org/chapter/12" target="_blank" rel="noopener"
 &gt;Holy Gita&lt;/a&gt; - Found it as a useful preparation tool for my RREs even before&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://amzn.in/d/06QS2u9X" target="_blank" rel="noopener"
 &gt;Bhagavad Gita by Eknath Eswaran&lt;/a&gt; - A very sophisticated and succinct version of the Bhagavad Gita&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="http://tiny.cc/gyb3vz" target="_blank" rel="noopener"
 &gt;The Essence of the Bhagavad Gita: Explained by Paramhansa Yogananda&lt;/a&gt; - Just tasted this chapter &amp;amp; it was good.&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.youtube.com/watch?v=2dV49i79lNg" target="_blank" rel="noopener"
 &gt;Chapter 12 BG video&lt;/a&gt; - My daily chapter learning/listening aid.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt;Aum sarvam SriKrishnarpanam astu.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Education &amp; me - State of mind in 2022</title><link>https://www.nacnez.com/education-me.html</link><pubDate>Sat, 14 Jan 2023 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/education-me.html</guid><description>

&lt;div class="admonition tip"&gt;
 &lt;p class="admonition-title"&gt;TL;DR&lt;/p&gt;
 &lt;div class="admonition-content"&gt;Education is the key to a better world for me &amp;amp; all my peers - the world. This is my first deep-dive to figure out what I can do in education.&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;I have begun an introspection journey, and I am sharing it with you.&lt;/p&gt;
&lt;h2 id="a-bit-about-me"&gt;&lt;a href="#a-bit-about-me" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;A bit about me&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;I have always felt that I need to do something in the field of education. Right from my time at college, I wanted to be a teacher. That did not happen. I started working in the Chemical Engineering field, but left it 1 year. Rest of my working life, I have been a software engineer.&lt;/p&gt;
&lt;p&gt;So what have I done in teaching?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I have conducted few sessions to teach something on software development or some business domain concepts to my fellow engineers. Always liked those sessions, but I have not done it for quite some time.&lt;/li&gt;
&lt;li&gt;I did a &lt;a class="link" href="https://www.youtube.com/playlist?list=PLMICa_F_j-IQBifxYmlYwm5-C1bE8Eh4e" target="_blank" rel="noopener"
 &gt;course on programming on Youtube&lt;/a&gt; as well. It was a lot of work, but it was satisfying. I learned a thing or two when doing it.&lt;/li&gt;
&lt;li&gt;I have taught my daughter some subjects when she was young.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Teaching my kid" src="https://www.nacnez.com/images/education_me/my_teaching.jpg"/&gt;
 &lt;p class="caption"&gt;Teaching my kid - An illustration - Image by &lt;a href="https://pixabay.com/users/ddimitrova-1155171/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=1641215"&gt;Daniela Dimitrova&lt;/a&gt; from &lt;a href="https://pixabay.com//?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=1641215"&gt;Pixabay&lt;/a&gt; 
&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Teaching always felt good!&lt;/p&gt;
&lt;h2 id="education-is-more-than-teaching"&gt;&lt;a href="#education-is-more-than-teaching" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Education is more than teaching&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;In later years, I felt that education is a much bigger idea than just teaching. Teaching is an aspect, but work on education needs to happen in multiple areas.&lt;/p&gt;
&lt;p&gt;People say &lt;span class="bold-calm"&gt;&amp;ldquo;Being literate is not equal to education&amp;rdquo;&lt;/span&gt;. I agree, but recently, I realize that being literate is probably the first step to education.&lt;/p&gt;
&lt;p&gt;I also used to think that being educated means being good. You might say, &lt;span class="bold-calm"&gt;&amp;ldquo;That is foolish &amp;amp; naive&amp;rdquo;&lt;/span&gt; and you are right. For someone to be good, they need not be literate or educated. Goodness can come from good practices, good conduct at home, etc. More than once, I have gotten clear proof that education and goodness have little connection.&lt;/p&gt;

&lt;div class="article-section"&gt;
 &lt;p&gt;So what is the purpose of education? What is the meaning of being educated?&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;I think, it is ability to think for yourselves and know that there are choices in life at every moment. And also know that there are ways to find those choices and then exercise those choices. The true goal of education is to enable this for the educated.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;To put it another way, education is necessary (but not sufficient) prerequisite for making good decisions in life. Every aspect of life needs decision-making.&lt;/span&gt;&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;Ok. I have got a working definition of what education is.&lt;/p&gt;
&lt;p&gt;Next, if I have to get educated or to get someone educated, what do I need to do?&lt;/p&gt;
&lt;h2 id="how-to-get-educated"&gt;&lt;a href="#how-to-get-educated" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;How to get educated?&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;I thought a lot about this and got one &amp;lsquo;clear&amp;rsquo;(🤔) answer. Life is probably the best way to educate us. Life experiences mold us and change us in many ways. Having said that, Life is not a great way because it leaves too much to chance. The results are unpredictable. Also, life happens to us anyway, so there is no real work required. So let me just drop that useless philosophical thought (🤯) into the trashcan and move to the next thing.&lt;/p&gt;
&lt;p&gt;What about acquisition of knowledge?&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;If I know &lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="bold-green"&gt;more about things that happen in the world&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span class="bold-green"&gt;about ways to think and analyze the world&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;then I become more educated. The key word is &amp;ldquo;know more&amp;rdquo;. How can I know more?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Literacy is a key step here. Basic literacy can enable anyone to read and know about anything of interest. When combined with the knowledge of using internet - a huge enabler - I can know more. And knowledge is power.&lt;/p&gt;
&lt;p&gt;Before I dive deeper into knowledge, I want to be clear. I don&amp;rsquo;t think having a lot of knowledge is a guarantee to become educated. There are other aspects, but I am not clear on what they are. But having knowledge is a necessary condition.&lt;/p&gt;
&lt;p&gt;As of now, my way forward is to focus on knowledge acquisition and knowledge transfer as a way to push all towards being educated.&lt;/p&gt;
&lt;h2 id="knowledge-acquisition-levels"&gt;&lt;a href="#knowledge-acquisition-levels" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Knowledge acquisition levels&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;I am thinking in terms of levels here. This is a categorization that I came up with. It is probably too rudimentary or naive. I am sure there is more refined ways &lt;span class="small-italicized-green"&gt;(maybe you can help me with ideas and references in the comments)&lt;/span&gt;, but I have to go with what I have:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class="bold-green"&gt;Enable basic literacy among people&lt;/span&gt;: I am talking about language learning and basic math capabilities. Both are required as a foundation to build anything.&lt;/li&gt;
&lt;li&gt;&lt;span class="bold-green"&gt;Enable basic internet literacy&lt;/span&gt;: Internet is the key resource of our information age. If I can help people to get on to it and navigate its waters then, it is a great step forward for them.&lt;/li&gt;
&lt;li&gt;&lt;span class="bold-green"&gt;Fine-tuning on providing basic skills&lt;/span&gt;: Once the basic access is created, fine-tuning both these areas is very challenging. I need to work on the quality of these interventions as it applies to recipient needs.&lt;/li&gt;
&lt;li&gt;&lt;span class="bold-green"&gt;Building higher order capabilities&lt;/span&gt;: The next big leap would be to cater to folks who have already got the basics right, but now need help to get to higher order abilities. There are different aspects to this one:
&lt;ul&gt;
&lt;li&gt;Getting access to information &amp;amp; books to increase knowledge.&lt;/li&gt;
&lt;li&gt;Finding ways to help people use these resources to get some economic benefit.&lt;/li&gt;
&lt;li&gt;Training people to acquire higher order skills and into full-fledged professions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span class="bold-green"&gt;Building a leader&lt;/span&gt;: The final step is where we can start changing a person to inspire others to follow their path.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="some-ideas-to-contribute"&gt;&lt;a href="#some-ideas-to-contribute" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Some ideas to contribute&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Before I get to ideas, there are things to consider in the above-mentioned levels.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Which level is the most important one? Which is the level that will have maximum impact? At what level do I want to contribute and can contribute?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;What is the kind of impact I want to make. Do I want to impact more people broadly and in a shallow manner? Or do I go for a deeper &amp;amp; focused impact on a smaller set of people.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With these questions &amp;amp; considerations still buzzing in me, I came up with some ideas. I am using these ideas as a way to figure out what I want to do, and what I can do. These are going to be top of the head ideas - nothing researched or detailed.&lt;/p&gt;
&lt;p&gt;I will start off with ideas that have deeper impact on a smaller set of people. Again, this is just brainstorming and asking myself on how this could work for me. How I could do some good work? So please expect lack of clarity. This is pretty much a brain dump, so expect some ugly lumps.&lt;/p&gt;
&lt;h3 id="focus-on-basic-literacy-and-create-deep-impact-on-a-small-set-of-people"&gt;&lt;a href="#focus-on-basic-literacy-and-create-deep-impact-on-a-small-set-of-people" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Focus on basic literacy and create deep impact on a small set of people&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;How can I do this?&lt;/p&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Basic literacy for small kids" src="https://www.nacnez.com/images/education_me/basic_literacy.jpg"/&gt;
 &lt;p class="caption"&gt;Basic literacy for small kids - Photo by &lt;a href="https://unsplash.com/@yansphotobook?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Yannis H&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/uaPaEM7MiQQ?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;I could join a primary school in a small town or village. I have never taught small kids (discounting teaching my daughter). So if I need to do this then I have to pick up the skills. I assume teaching at that level needs a lot of patience. That could be an advantage since I am generally considered patient, but I know that certain activities have tried my patience before. So the jury is out.&lt;/p&gt;
&lt;p&gt;If I set aside the skill &amp;amp; effort needed, and focus on the outcome, then the idea has merit. If I am able to make 10-20 kids better at basic math and language, which allows them to step up to higher capabilities, it can be extremely rewarding. One key aspect I need to inculcate, is building some kind of regular discipline and cadence for the kids to learn. It is a key ingredient to be taught to all people if they want to do anything with life including learning. My wife has a knack of doing this. I could probably learn from her. I could probably involve her directly in this.&lt;/p&gt;
&lt;p&gt;This idea has some legs and I need to think deeper on it.&lt;/p&gt;
&lt;hr class="style-two"/&gt;
&lt;h3 id="focus-on-basic-internet-literacy--create-a-deep-impact-on-a-small-set-of-people"&gt;&lt;a href="#focus-on-basic-internet-literacy--create-a-deep-impact-on-a-small-set-of-people" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Focus on basic internet literacy &amp;amp; create a deep impact on a small set of people&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;This one plays a bit more to my strength as a heavy internet user. That said, I see that lot of the younger generation are catching on to the internet faster than petrol catching fire.&lt;/p&gt;
&lt;p&gt;This can be a fire hazard &lt;span class="small-italicized-green"&gt;(pun intended)&lt;/span&gt; and lead to catastrophe for these young people. But I don&amp;rsquo;t think I am equipped to stop that from happening. It is difficult to control &amp;amp; monitor the activities of your own kid (a very bad idea, but I am just talking about feasibility). Here I am talking about controlling the activities of kids who are just students coming to a class - &lt;span class="bold-angry"&gt;no authority, no accountability, potentially crossing all sorts of lines&lt;/span&gt;. That is a lot of mess!&lt;/p&gt;
&lt;p&gt;This idea has some legs and I need to think deeper on it. Let us move forward.&lt;/p&gt;
&lt;hr class="style-two"/&gt;
&lt;p&gt;This idea might work with a set of older people (middle-aged &amp;amp; above) who also need to get basic internet literacy. Once literate, they can better handle &amp;amp; guide the next generation (their kids) who they deal with on a regular basis. To do this, I would need to set up an adult education center and also need a bunch of used computers to be used by the attendees. Again it makes sense to do this in a village or small town setting (or even a slum like setting in a big city). This variation of the idea may work for me.&lt;/p&gt;
&lt;hr class="style-two"/&gt;
&lt;h3 id="working-on-alternative-pedagogical-techniques-for-basic-literacy"&gt;&lt;a href="#working-on-alternative-pedagogical-techniques-for-basic-literacy" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Working on alternative pedagogical techniques for basic literacy&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;I could work to improve the quality of basic literacy efforts using different/innovative techniques &amp;amp; solutions. I have heard of some players in this social space like &lt;a class="link" href="https://www.pratham.org/" target="_blank" rel="noopener"
 &gt;Pratham&lt;/a&gt;, &lt;a class="link" href="https://kanavu.in/" target="_blank" rel="noopener"
 &gt;Kanavu&lt;/a&gt; etc. They are trying to get plugged into existing schools to try &amp;amp; improve their output.&lt;/p&gt;
&lt;p&gt;The ideas could be newer ways of learning, better tools (hardware or software), better processes etc. I need to explore this area a lot more. I feel, I could make meaningful contributions here based on my knowledge and experience. Having said that, I might be whistling in the dark. Need to dig in, to figure this one out.&lt;/p&gt;
&lt;hr class="style-two"/&gt;
&lt;h3 id="working-on-higher-order-skill-development-for-a-small-set-of-people"&gt;&lt;a href="#working-on-higher-order-skill-development-for-a-small-set-of-people" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Working on higher order skill development for a small set of people&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;I could focus on slightly older kids already going to schools in small cities &amp;amp; towns and give them exposure to extracurricular learning &amp;amp; knowledge.&lt;/p&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Higher order capabilities learning" src="https://www.nacnez.com/images/education_me/higher_learning.jpg"/&gt;
 &lt;p class="caption"&gt;Higher order capabilities learning - Photo by &lt;a href="https://unsplash.com/@javotrueba?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;javier trueba&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/iQPr1XkF5F0?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;These could be areas like interpersonal communication, leadership, self-discipline, personal finance management, risk taking, career guidance etc. As a kid, I feel that I did not focus on these aspects and had to build &lt;span class="small-italicized-green"&gt;(and still building)&lt;/span&gt; a lot of it over the years. Many students and their parents are not even aware that these areas are important.&lt;/p&gt;
&lt;p&gt;There could be various ways to do this:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create a small used books library containing a good collection of relevant books that these kids can borrow and read. I could augment it with discussion sessions or presentations which could encourage, inspire and help them understand the topics covered in these books.&lt;/li&gt;
&lt;li&gt;Create summary content on these topics from great books (like &lt;a class="link" href="https://kukufm.com/" target="_blank" rel="noopener"
 &gt;KukuFM&lt;/a&gt;). This can be difficult for me to pull off alone though. &lt;span class="small-italicized-green"&gt;But do I need to do it alone?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Work on career &amp;amp; higher education guidance programs which can help youth to figure out the avenues where they can add value to themselves and the society. &lt;a class="link" href="https://lmes.in/" target="_blank" rel="noopener"
 &gt;LMES&lt;/a&gt; is a good example, but I think they are big and broad based. Instead, I could choose my work to be more focused by conducting &amp;amp; managing seminars to a smaller group of people.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Speaking of LMES; that kind of setup can allow me to do such work which is of higher breadth and lower depth.&lt;/p&gt;
&lt;p&gt;Maybe it is time to explore those type of broad based ideas.&lt;/p&gt;
&lt;hr class="style-two"/&gt;
&lt;h3 id="working-on-improving-basic-literacy-but-in-a-large-scale"&gt;&lt;a href="#working-on-improving-basic-literacy-but-in-a-large-scale" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Working on improving basic literacy but in a large scale&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Solving basic literacy at a large scale but with lower depth is truly a scale and resource problem.&lt;/p&gt;
&lt;p&gt;One naive idea could be to create a free mobile app which helps people to learn alphabets of specific languages and may even provide math lessons. This app has the potential to reach a lot of people. But expecting the app to create a deep impact &lt;span class="small-italicized-green"&gt;(or any impact)&lt;/span&gt; in even a small set of people is not something I can count on. That said, this is an idea I could work with since I have some basic skills in this area &lt;span class="small-italicized-green"&gt;(or at least I can build them relatively quickly)&lt;/span&gt;. I still need to gain some pedagogical knowledge to make the intervention useful. The key thing is that it is very difficult to figure out the depth of impact with this idea and that can be a deal-breaker.&lt;/p&gt;
&lt;hr class="style-two"/&gt;
&lt;h3 id="working-on-improving-internet-access--literacy-but-in-a-large-scale"&gt;&lt;a href="#working-on-improving-internet-access--literacy-but-in-a-large-scale" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Working on improving internet access &amp;amp; literacy but in a large scale&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Building something which will provide basic internet access at a large scale needs a lot of money. Companies like Google and Facebook tried this (and failed or slightly succeeded). I need a lot of resources to do this. Or I need to come up with a revolutionary idea/tech, which is fantastic to be funded by somebody huge, and benevolent (or has the business acumen) to make this accessible to all. While they say nothing is impossible, this one is pretty close from my perspective.&lt;/p&gt;
&lt;hr class="style-two"/&gt;
&lt;h3 id="create-high-quality-content-for-a-lot-of-people"&gt;&lt;a href="#create-high-quality-content-for-a-lot-of-people" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Create high quality content for a lot of people &lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Creating high quality content to build knowledge &amp;amp; skills for people to receive benefit like jobs or higher learning is a good idea. I can&amp;rsquo;t do it for all areas, but I could do it for some areas. Potential ideas are to build apps or make courses &lt;span class="small-italicized-green"&gt;(attempted &lt;a class="link" href="https://www.youtube.com/playlist?list=PLMICa_F_j-IQBifxYmlYwm5-C1bE8Eh4e" target="_blank" rel="noopener"
 &gt;one&lt;/a&gt; without much success - not high quality I suppose!)&lt;/span&gt;, which can reach a lot of folks - there are lots of platforms for that. Again, will they truly be useful and cause any meaningful change is difficult to figure out.&lt;/p&gt;
&lt;hr class="style-two"/&gt;
&lt;p&gt;For large scale stuff, I am not able to think anything beyond creating apps or courses (online access based). Really seem to have dearth of ideas.&lt;/p&gt;
&lt;h2 id="stopping-now"&gt;&lt;a href="#stopping-now" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Stopping now&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Ok. At this point I have run out of ideas. Also, I have run out of steam to figure out more on this. Need a recharge. Besides some of these ideas need me to dig and research more. Without doing that, a decision is difficult to make.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;One note for myself - I don&amp;rsquo;t have to pick one idea. I could pick more than one from above. Will I be able to do multiple things? - is different question. As of now, I will leave it here. Once I have some more clarity, I will be back to share my mind - on education and where I need to go.&lt;/p&gt;
&lt;p&gt;Please do share you thoughts and ideas with me.&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt;Aum sarvam SriKrishnarpanam astu&lt;/span&gt;&lt;/p&gt;</description></item><item><title>The Daily Scrum/Stand-up Meeting</title><link>https://www.nacnez.com/daily-scrum.html</link><pubDate>Sat, 14 Jan 2023 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/daily-scrum.html</guid><description>

&lt;div class="admonition tip"&gt;
 &lt;p class="admonition-title"&gt;TL;DR&lt;/p&gt;
 &lt;div class="admonition-content"&gt;A good stand-up is always about the team. A team which shows ownership, respects each other and works with an agreed structure will do great.&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;For many years, I have been part of teams that follow the agile methodology and practises some kind of scrum. One of the key practices in agile scrum is the Daily Stand-up or Scrum meeting. The DSM is done in different ways, and it is really up to the team to do what works best for them. That said, there are certain characteristics which are important to maintain, irrespective of the team which is following DSM. I explain these characteristics as I understand them and see fit.&lt;/p&gt;
&lt;h2 id="a-typical-daily-scrum-meeting"&gt;&lt;a href="#a-typical-daily-scrum-meeting" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;A typical Daily Scrum Meeting&lt;/span&gt;
&lt;/h2&gt;&lt;hr class="style-two"/&gt;
&lt;div class="figure"&gt;
 &lt;img alt="DSM Virtual Meeting" src="https://www.nacnez.com/images/dsm/dsm_1.jpeg"/&gt;
 &lt;p class="caption"&gt;A Virtual DSM: Photo by &lt;a href="https://unsplash.com/@cwmonty?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Chris Montgomery&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/smgTvepind4?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;It is 11:30am in the morning. Every one from the &amp;ldquo;Delta&amp;rdquo; team has assembled in the virtual meeting room. Out of 13 member team (11 developers, 1 product owner and 1 engineering manager), only a few of them had turned on the video. Some kind of construction noise is heard in the background. Ram, the manager opens the scrum dashboard and filters the cards for Hasina, a team member.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Ok Hasina, can you please share your update&amp;rdquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Sure Ram. Yesterday, I was working on these items but got stuck on some testing issues. Ram, what is the priority of this task?&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Hasina, this needs to be delivered by the end of this week. So we need to plan accordingly&amp;rdquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Got it Ram. What about this other requirement? Should I pick that as well now or later?&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Let us do that later.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Ok Ram. Other than that, I was able to close out this story NZ-202. I will be picking up new story today from the TODO lane&amp;rdquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Thanks Hasina. Can anybody who is not talking turn off their mikes? There is too much noise&amp;hellip; Gagan, can you share your updates.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt; Hasina turns off her video. Also, the background noise dies down. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Ok Ram. I am facing some kind of strong migration issue.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Can you give some context on this Gagan?&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Oh sure Ram. Yesterday, I was working on the status check API story and was trying to do the DB model changes. That is when I faced the problem.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Can you explain the details of the issue?&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;So when I try to deploy the migration script locally&amp;hellip;. &lt;em&gt;blah&lt;/em&gt;&amp;hellip; &lt;em&gt;blah&lt;/em&gt;&amp;hellip; &lt;em&gt;blah&lt;/em&gt;&amp;hellip; &amp;ldquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt; Vikas, a developer joins the call. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Have you tried to close the console and start a new session&amp;rdquo; chimed in Winston&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;That did not help&amp;rdquo; said Gagan.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;What about trying to restart the laptop?&amp;rdquo; Winston countered.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Come on, that is not a solution buddy!&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Vidya starts fidgeting with her keychain as this happens. Shanti (the Product Manager) lets out a muffled yawn.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;There is an option in the library to turn off specific test cases. You could use that Gagan&amp;rdquo; said Abdul.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Thanks Abdul. I will try that out&amp;rdquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Can you continue with the update, Gagan&amp;rdquo; said Ram.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Sure Ram. So I will continue working on this issue today and I will try to close it out by EOD today&amp;rdquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Thanks Gagan. Vidya, can you give an update&amp;rdquo;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Sure Ram. Let me see&amp;hellip;. What was I working on?&amp;hellip; Yeah, I worked on the validation story&amp;hellip; no that was day before&amp;hellip; sorry. Yes I worked on the transformation story yesterday&amp;hellip; blah&amp;hellip; blah&amp;hellip; blah&amp;hellip; &lt;/span&gt;
&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;This goes on for 40 minutes and at 12:10 pm, Ram asks Shanti&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Do you have any product updates for the team Shanti?&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Nothing from me Ram.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;&amp;ldquo;Great. Have a good day folks!&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;hr class="style-two"/&gt;
&lt;p&gt;This is a typical Daily Stand-up or Scrum meeting I observe in my world. I am sure many of you have experienced something similar. I want to dissect this example, but first I want to give you some historical context on Stand-ups and Daily Scrum meetings.&lt;/p&gt;
&lt;h2 id="origins"&gt;&lt;a href="#origins" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Origins&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;The daily stand-up originated from the annals of Extreme Programming (XP). Kent Beck made this methodology famous through his book by the &lt;a class="link" href="https://www.goodreads.com/en/book/show/67833.Extreme_Programming_Explained" target="_blank" rel="noopener"
 &gt;same name&lt;/a&gt; (almost). The daily stand-up was just one of the practices/rules in Extreme Programming (dig more &lt;a class="link" href="http://www.extremeprogramming.org/rules.html" target="_blank" rel="noopener"
 &gt;here&lt;/a&gt;). Our focus is only the daily stand-up.&lt;/p&gt;
&lt;p&gt;Let me add some quotes from the source&lt;/p&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt;A stand up meeting every morning is used to communicate problems, solutions, and promote team focus. Everyone stands up in a circle to avoid long discussions. It is more efficient to have one short meeting that every one is required to attend than many meetings with a few developers each.&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt;During a stand up meeting developers report at least three things; what was accomplished yesterday, what will be attempted today, and what problems are causing delays. The daily stand up meeting is not another meeting to waste people&amp;rsquo;s time. It will replace many other meetings giving a net savings several times its own length &lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&amp;hellip; &lt;a class="link" href="http://www.extremeprogramming.org/rules/standupmeeting.html" target="_blank" rel="noopener"
 &gt;Source&lt;/a&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;p&gt;I think this is a good description for us to work with.&lt;/p&gt;
&lt;p&gt;Let us move to the Daily Scrum meeting which comes from the &lt;a class="link" href="https://www.scrum.org/resources/what-is-scrum" target="_blank" rel="noopener"
 &gt;Scrum methodology&lt;/a&gt;. Again, I am going to the source:&lt;/p&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt;The purpose of the Daily Scrum is to inspect progress toward the Sprint Goal and adapt the Sprint Backlog as necessary, adjusting the upcoming planned work.&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt;The Daily Scrum is a 15-minute event for the Developers of the Scrum Team. To reduce complexity, it is held at the same time and place every working day of the Sprint. If the Product Owner or Scrum Master are actively working on items in the Sprint Backlog, they participate as Developers.&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt;The Developers can select whatever structure and techniques they want, as long as their Daily Scrum focuses on progress toward the Sprint Goal and produces an actionable plan for the next day of work. This creates focus and improves self-management.&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt;Daily Scrums improve communications, identify impediments, promote quick decision-making, and consequently eliminate the need for other meetings.&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt;The Daily Scrum is not the only time Developers are allowed to adjust their plan. They often meet throughout the day for more detailed discussions about adapting or re-planning the rest of the Sprint’s work.&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&amp;hellip; &lt;a class="link" href="https://scrumguides.org/scrum-guide.html#daily-scrum" target="_blank" rel="noopener"
 &gt;Source&lt;/a&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;p&gt;Though these two processes have different origins, you can surely notice similarities. I will list the ones which strike me:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;They happen on a daily basis, preferably in the morning.&lt;/li&gt;
&lt;li&gt;One of their main purpose is to eliminate other meetings.&lt;/li&gt;
&lt;li&gt;They are expected to be short (you can potentially stand through them).&lt;/li&gt;
&lt;li&gt;They are &lt;strong&gt;owned by Developers&lt;/strong&gt;, allowing them to manage themselves as a team.&lt;/li&gt;
&lt;li&gt;You talk about progress made and impediments faced/facing in both cases.&lt;/li&gt;
&lt;li&gt;Goal is to work on a plan and improve focus and self-management.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;There could be more, but these stand out to me. Using these sources as the main reference (I will include other ideas if required), let us dissect the example DSM (of the &lt;em&gt;Delta&lt;/em&gt; team) which I described before. I am treating the name stand-up (XP) and daily scrum meeting (DSM) as synonyms. If you see one, I mean either.&lt;/p&gt;
&lt;p&gt;Before you look at my thoughts below, spend sometime dissecting the &lt;em&gt;Delta&lt;/em&gt; stand-up and share the same in comments below.&lt;/p&gt;
&lt;hr class="style-three"/&gt;
&lt;h2 id="the-delta-team-dsm-biopsy"&gt;&lt;a href="#the-delta-team-dsm-biopsy" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;The &amp;ldquo;Delta Team&amp;rdquo; DSM biopsy&lt;/span&gt;
&lt;/h2&gt;&lt;div class="figure"&gt;
 &lt;img alt="Doing a biopsy on the Delta team DSM" src="https://www.nacnez.com/images/dsm/biopsy.jpg"/&gt;
 &lt;p class="caption"&gt;Disecting the Delta DSM - image by &lt;a href="https://pixabay.com/users/ri_ya-12911237/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=4607284"&gt;Ri Butov&lt;/a&gt; from &lt;a href="https://pixabay.com//?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=4607284"&gt;Pixabay&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
### &lt;span class="bold-green"&gt;The "Good Parts"&lt;/span&gt;
There are good things happening in the *Delta* team stand-up.
&lt;ol&gt;
&lt;li&gt;The stand-up happens at a regular daily cadence.&lt;/li&gt;
&lt;li&gt;Developers have the ability to bring up their impediments and get solutions to move things forward.&lt;/li&gt;
&lt;li&gt;There is free-flowing conversation happening between developers.&lt;/li&gt;
&lt;li&gt;There is an explicit section for the PM to chime in and add thoughts. This is not prescribed in any of the original guides, but I like this idea as long as it is kept short.&lt;/li&gt;
&lt;li&gt;They are using the common scrum dashboard to drive the meeting. This allows people to get on the same page quickly, and they have the reference to dive deeper if required.&lt;/li&gt;
&lt;li&gt;Some people are turning on video for the call and that is good thing. More about this on the other sections.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I have not elaborated the above good parts because I think they are self-evident. Let us get into some &lt;span class="bold-angry"&gt;not so good parts&lt;/span&gt; now.&lt;/p&gt;
&lt;h3 id="the-time"&gt;&lt;a href="#the-time" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;The time&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The &lt;em&gt;Delta&lt;/em&gt; team stand-up starts at 11:30 am. I am not sure if that can be called &lt;span class="bold-angry"&gt;&lt;em&gt;morning&lt;/em&gt;&lt;/span&gt;. That is closer to the afternoon. There could be legitimate reasons for this - people working in different time zones. Also in today&amp;rsquo;s world of flexible work timings this is probably unavoidable.&lt;/p&gt;
&lt;p&gt;Having said that, if you ask me, I would prefer the stand-up to start much earlier - sometime around 9:30 am. My reason is that the stand-up is supposed to help you create an action plan for the day (this is not really planning but to get clarity). It is better to have this clarity earlier in the day, so that team members know where they have to focus on.&lt;/p&gt;
&lt;p&gt;Other aspect of time is the duration. 40-45 minutes of stand-up time is very high. The reason why extreme programming suggests the stand-up should be done standing up is to keep it short (it is actually not necessary for people to stand up as long as the duration is kept in mind). Similarly, the scrum guide also suggests that the DSM should be 15 minutes long.&lt;/p&gt;
&lt;p&gt;In my experience, when a team gets together for the stand-up discussion, there are times when it needs a little more time (than 15 minutes). But not always. A steady 45-minute stand-up is a smell (like a code smell) to be addressed. We will look at some remedies soon after the biopsy.&lt;/p&gt;
&lt;h3 id="the-ownership"&gt;&lt;a href="#the-ownership" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;The ownership&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Carefully observe &lt;span class="small-italicized-green"&gt;(means read again if required)&lt;/span&gt; the DSM conducted by the &lt;em&gt;Delta&lt;/em&gt; team, and tell me who is the owner of the meeting. I feel that the meeting is owned by Ram who is actually a manager. In scrum terms, we could probably treat him as the Scrum master.&lt;/p&gt;
&lt;p&gt;Ram governs the flow of the conversation. Everyone is talking to him in the stand-up. This is really wrong. A practice like this converts the daily stand-up meeting into a status meeting. Once this happens, the team is just answerable to the manager. Self-management, team spirit and team ownership go out of the window. People will not enjoy going to these meetings since they are afraid that the manager will judge them. Real impediments may not get discussed. This is a very bad situation and needs remediation. The &lt;em&gt;Delta&lt;/em&gt; team may not be in this situation yet, but they are in-route.&lt;/p&gt;
&lt;p&gt;Another thing that adds to this issue is that the Delta team is fairly large. A 13 member team can be pretty crowded and intimidating especially for junior developers and new joinees. This is only a passing mention. Its implication &amp;amp; solution is beyond the scope of this article.&lt;/p&gt;
&lt;h3 id="the-rambling"&gt;&lt;a href="#the-rambling" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;The rambling&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The &lt;em&gt;Delta&lt;/em&gt; team stand-up is very ad-hoc in my opinion. Everybody seems to be talking all the time. There is no structure to the conversation. The Extreme Programming stand-up actually prescribes a structure to the conversation. The Scrum DSM is little more flexible but has essentially advocated similar kind of information to be shared - Work progress, Impediments, Plan for today etc.&lt;/p&gt;
&lt;p&gt;In the Delta team stand-up, Gagan starts his conversation with mentioning an impediment. Ram draws out the context and eventually multiple others (Winston and Abdul) jump in to try to suggest a solution and this drags on leading to others getting restless. The availability of help is a good thing, but the lack of structure leads to rambling and others tuning out of it. This kind of rambling conversation is also why the stand-up stretches out for such a long time. This also leads to people tuning out of the conversation.&lt;/p&gt;
&lt;p&gt;Another source of rambling is the lack of preparation of the team members when they come to the stand-up. Vidya keeps stumbling to figure out what she needs to talk about. This again leads to wastage of time. It also sends a wrong message that there is no respect for people&amp;rsquo;s time. Bad!&lt;/p&gt;
&lt;h3 id="what-goal"&gt;&lt;a href="#what-goal" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;What Goal?&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Another thing missing in the DSM is the absence of discussion or tracking to check team&amp;rsquo;s progress towards their Sprint goal. Typically, teams look at a burn-down chart to figure out where they are with respect to what they planned for the sprint.&lt;/p&gt;
&lt;p&gt;Scope discussions should be related to already defined goals and if they need to be altered. In the Delta team, the priorities seem to be unclear and getting figured out in the stand-up. While this is better than not getting clarity, the ideal place for this is the Sprint planning meeting.&lt;/p&gt;
&lt;h3 id="rude"&gt;&lt;a href="#rude" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Rude?&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;I am not saying that the Delta team folks are talking rudely to each other or behaving badly. But there are some subtle things to look at.&lt;/p&gt;
&lt;p&gt;Right at the beginning of the meeting, there was noise coming in to the stand-up meeting. Only after Ram called it out, the relevant person muted their audio to stop the disturbance. While this is not outright rude, it just tells that the team members are insensitive to others. Also, this might be a one off and if so, we could ignore it. But if this happens regularly then it means that the team is not following basic etiquette.&lt;/p&gt;
&lt;p&gt;Another similar incident in the Delta stand-up is Vikas joining late. This again sets up a bad precedence for the entire team. I am not talking about being late by a few seconds or a minute.&lt;/p&gt;
&lt;p&gt;In my opinion, it is better to send an offline update to the team rather than joining the stand-up after minutes of its starting.&lt;/p&gt;
&lt;h2 id="remedial-ideas"&gt;&lt;a href="#remedial-ideas" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Remedial Ideas&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Now that the biopsy and diagnosis is complete, it is time for some remedial actions.&lt;/p&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Remedies for a better DSM for Delta team" src="https://www.nacnez.com/images/dsm/remedy.jpg"/&gt;
 &lt;p class="caption"&gt;Remedies for improving the DSM - image by &lt;a href="https://pixabay.com/users/angelorosa-4392745/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=2055130"&gt;Angelo Rosa&lt;/a&gt; from &lt;a href="https://pixabay.com//?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=2055130"&gt;Pixabay&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;h3 id="transfer-ownership-to-team"&gt;&lt;a href="#transfer-ownership-to-team" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Transfer Ownership to team&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The first thing I want to address is the aspect of ownership. While other aspects are important, this one is critical. There are a couple of things that Ram (the scrum master) can do to change the situation:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Ask everyone to explicitly address the team instead of addressing him (the manager/ the scrum master). This might seem silly, but doing this sends a signal. The mindset created is that as a developer, &amp;ldquo;I am responsible to the whole team. We as a team own this&amp;rdquo;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;There is need for someone to govern the flow of the conversation. So get developers to take turns (round-robin) at playing that role. I have successfully tried this with my teams and found that it helps. Doing this helps to reinforce the feeling that we are a team and are responsible for each other. This technique also helps groom team members to act like owners and help in governance. As a side benefit, the shy developers get a chance to express themselves in a safe environment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A key thing to note is that ownership &amp;amp; accountability comes only if one has a say on how things go. This means that Ram shouldn&amp;rsquo;t be dictating all the decisions of any process (including stand-up). The members of the team must have a say, and they need to feel heard. Decisions have to be taken jointly. While this might be more time-consuming, decisions taken this way stick better.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once these are done, ownership is no longer with Ram but with the entire team. Team is empowered to own its destiny, Ram (the manager) is just a guide in the process. This drives ownership back into the team.&lt;/p&gt;
&lt;h3 id="create-a-structure"&gt;&lt;a href="#create-a-structure" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Create a structure&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The second key thing to address is the rambling. We do this by providing some structure to the stand-up discussion. The team can do a couple of things:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Make every member to stick to a common structure of providing the updates. The team could adopt the XP style or a variation of it &lt;span class="bold-calm"&gt;as decided by the team&lt;/span&gt;. It is the job of the team as a whole (or the current week coordinator/scrum master - not the Manager) to ensure that the team members follows the structure when they provide updates.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;When a developer is stuck and needs help or discussion then they can announce a &lt;strong&gt;&amp;ldquo;Post Stand-up&amp;rdquo;&lt;/strong&gt; discussion that is needed after stand-up. Some of you might have heard this term before; I will explain it down the line.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ensure that we look at where we are with respect to the Spring goal. Discuss progress using burn-down charts etc. to ensure that everyone understands where we are and where we are going.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="article-section"&gt;
 &lt;h4 id="how-a-post-stand-up-works"&gt;&lt;a href="#how-a-post-stand-up-works" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;How a Post Stand-up works?&lt;/span&gt;
&lt;/h4&gt;&lt;p&gt;As part of stand-up, I mention that I worked on a particular task/story yesterday and I plan to either continue on it or pick another one today. I might have an impediment for which I need help or want a discussion to clear out some ideas. For doing this I state that I need a &amp;ldquo;Post Stand-up&amp;rdquo; discussion after everyone goes through their own updates. The stand-up is complete once updates and sprint progress discussions are complete. For the Post stand-up discussion, relevant &amp;amp; interested people can stay and others can drop off. This saves time for many developers who are not connected to the discussion. Also, the post stand-up allows the stand-up discussion to be more focused, structured and short. Since only relevant people need to be present, the post stand-up discussion itself could become more focused.&lt;/p&gt;
&lt;p&gt;There can be a concern that if we create post stand-ups then the team could lose out on learnings that might come from knowing about the impediments &amp;amp; solutions. This is a valid concern, but post stand-ups don&amp;rsquo;t eliminate participation. It only makes it a choice for the person which respects their time and pressures. In my experience, I have found that this works well for teams.&lt;/p&gt;
&lt;p&gt;Again, remember that the &lt;em&gt;Post Stand-up&lt;/em&gt; is a good broad idea. You can use it, tweak it and make it your own.&lt;/p&gt;

&lt;/div&gt;

&lt;p&gt;I also want to emphasize that we need the stand-up to be a place where developers can have free-flowing and open conversations. The structure is only to help the developers, but if that structure becomes a problem then we obviously need to change things up. As I said earlier, this should be done as a team.&lt;/p&gt;
&lt;p&gt;Once you have a structure and start having post stand-ups, the duration of stand-up will come down (provided some of the below etiquette are followed). You can (and should) measure it so that we know how we are doing. I have done this with one of my sprint teams (after discussing with the team of course) and it helped us to look for ways to fine-tune the stand-up process. Measurement is almost always a good thing.&lt;/p&gt;
&lt;h3 id="good-etiquette"&gt;&lt;a href="#good-etiquette" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Good etiquette&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;It always pays to be well-mannered and nice to each other. It also helps to be prepared. The following list of things are simple rules which ideally developers / team members should follow. The scrum master / manager should also nudge the members when required:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Always join the stand-up on time. Punctuality is a good thing.&lt;/li&gt;
&lt;li&gt;Mute yourselves when you are not talking. Actively listen though&lt;/li&gt;
&lt;li&gt;Prepare for the stand-up before it starts and not when another team member is giving their updates (you need to listen at that time). This will just take 2 minutes.&lt;/li&gt;
&lt;li&gt;Show yourselves - be on video. This helps you and the team in many ways.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="conclusionclosing-thought"&gt;&lt;a href="#conclusionclosing-thought" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Conclusion/Closing thought&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Tweaking things to make it work for you is very much in the spirit of agile. We still need to ensure that the fundamental philosophies are not compromised by our innovative techniques.&lt;/p&gt;
&lt;p&gt;This ends my own observations/learnings of one of the key processes in today&amp;rsquo;s agile development world. What are you thoughts? Do you agree? Or do you think this is all &lt;code&gt;b*l***t&lt;/code&gt;? Your comments are welcome below.&lt;/p&gt;
&lt;h2 id="references"&gt;&lt;a href="#references" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;References&lt;/span&gt;
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="http://www.extremeprogramming.org/rules/standupmeeting.html" target="_blank" rel="noopener"
 &gt;Daily Stand Up Meeting&lt;/a&gt; - Definition source&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://scrumguides.org/scrum-guide.html#daily-scrum" target="_blank" rel="noopener"
 &gt;Scrum Guide - Daily Scrum&lt;/a&gt; - Definition source&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.scrum.org/forum/scrum-forum/38945/daily-scrum-and-daily-standup-same" target="_blank" rel="noopener"
 &gt;Scrum Org: Daily Scrum discussion&lt;/a&gt; - A discussion on differences&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://zenexmachina.com/daily-stand-up-why-its-time-to-ditch-the-3-questions/" target="_blank" rel="noopener"
 &gt;Daily Stand-up: Why it’s time to ditch the ‘3 questions’&lt;/a&gt; - A good article on what we can focus on in standup&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://medium.com/north-code/s1e1-the-daily-stand-up-532fe59e11a1" target="_blank" rel="noopener"
 &gt;Scrum Practices: The Daily Standup&lt;/a&gt; - Good set of tips to follow&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.atlassian.com/agile/scrum/standups" target="_blank" rel="noopener"
 &gt;Daily stand-ups for agile teams&lt;/a&gt; - An Atlassian perspective on standups - good tips on remote standups&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://walkingtree.tech/detect-scrum-anti-patterns/" target="_blank" rel="noopener"
 &gt;How to detect Scrum anti-patterns?&lt;/a&gt; - Good write up on anti-patterns of agile itself. You can focus on DSM like me.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt;Aum sarvam SriKrishnarpanam astu&lt;/span&gt;&lt;/p&gt;</description></item><item><title>The flogging bulldozer which broke the bridge</title><link>https://www.nacnez.com/flogging-bulldozer.html</link><pubDate>Sat, 14 Jan 2023 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/flogging-bulldozer.html</guid><description>

&lt;div class="admonition tip"&gt;
 &lt;p class="admonition-title"&gt;TL;DR&lt;/p&gt;
 &lt;div class="admonition-content"&gt;We have seen divisive politics around us for some time now. It seems this has seeped into the bureaucracy, which is more interested in posturing than doing their job.&lt;/div&gt;
&lt;/div&gt;

&lt;div class="figure"&gt;
 &lt;img alt="Representing Bureaucracy" src="https://www.nacnez.com/images/bureaucracy.jpg"/&gt;
 &lt;p class="caption"&gt;Representing Bureaucracy: Photo by © Jorge Royan / &lt;a href="http://www.royan.com.ar"&gt;http://www.royan.com.ar&lt;/a&gt; / CC BY-SA 3.0&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Sometime back, I heard the news of municipalities using bulldozers to raze done illegal constructions. &amp;ldquo;Illegal&amp;rdquo; is supposed to be clear term, but recently there seems to be nuances to it that I was not aware. But I let it go.&lt;/p&gt;
&lt;p&gt;Then I heard about policemen flogging people in public. This was really disturbing; the comparisons with Taliban did not feel misplaced.&lt;/p&gt;
&lt;p&gt;Then the bridge broke down killing a lot of people. That hurt. I could no longer remain quiet and decided to dig deeper. But, I couldn&amp;rsquo;t get to it immediately. But better late than never.&lt;/p&gt;
&lt;h2 id="dismantling-bulldozer"&gt;&lt;a href="#dismantling-bulldozer" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Dismantling Bulldozer&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;These events happened long time back, but the internet always has the answer. You still have to know where to look. &lt;a class="link" href="" &gt;&lt;span class="bold-green"&gt;ThePrint&lt;/span&gt;&lt;/a&gt; has been one of the publications that I have been following for a long time and I trust them. So I decided to try there first (references at the end). I had heard about these bulldozer events in their podcast, but the context had slipped away.&lt;/p&gt;
&lt;p&gt;The Bulldozer culture seems to have started in UP where the CM Yogi used it as a tool to bring law and order changes. He eliminated powerful criminals doing this and was rewarded by the people by getting re-elected. That seems to have started the trend.&lt;/p&gt;
&lt;p&gt;Other BJP state CMs took notice. Now, we come to the part where the problem starts. Multiple incidents seem to be reported in Madhya Pradesh, where the CM used the Bulldozer to penalize criminal activity or rioting. There is no law to do this, and the excuse given seems to be demolition of encroachments. As per the law (which varies from state to state), the minimum requirement is that the evicted person must be given notice. ThePrint says that this was not the case.&lt;/p&gt;
&lt;p&gt;Other BJP managed states followed suit and the trend seemed to be clear. The Bulldozer acting on &amp;ldquo;illegal construction&amp;rdquo; is going to be the tool of choice to &amp;ldquo;discipline&amp;rdquo; certain sects of people. At least that is the feeling I got after reading these articles.&lt;/p&gt;
&lt;p&gt;But let me step back. May be, I am biased in saying the above statement. One thing is clear. The municipality (bureaucracy) demolition of illegal construction for any reason, without giving notice, is a breach of their contract with the people. Something is out of whack.&lt;/p&gt;
&lt;h2 id="public-flogging"&gt;&lt;a href="#public-flogging" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Public Flogging&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;The flogging incident had a left a bad taste in me from the time it happened. The place it happened was &lt;span class="bold-angry"&gt;Gujarat - Ground 0&lt;/span&gt;. I again dug through articles on ThePrint and this is what I gathered.&lt;/p&gt;
&lt;p&gt;The Sarpanch of the village had promised to conduct a &lt;span class="bold-green"&gt;&lt;em&gt;Garba&lt;/em&gt;&lt;/span&gt; for the people, and he decided to fulfill the promise. The location was close to a mosque and the folks from the mosque asked to ensure that the Garba shouldn&amp;rsquo;t disturb their &lt;span class="bold-green"&gt;&lt;em&gt;Id&lt;/em&gt;&lt;/span&gt; preparations. The Garba happened. It is not clear how much of a disturbance it was, but there was some stone pelting. The police caught some people who were alleged to have done this. At this point, it seems that this was a regrettable incident.&lt;/p&gt;
&lt;p&gt;But then it turned into a catastrophe.&lt;/p&gt;
&lt;p&gt;The policemen (couple of people) took 3 of the alleged muslim youth and flogged then in public to the cheers of surrounding public. The Sarpanch was also egging them on. The &amp;ldquo;people egging on&amp;rdquo; makes me feel sick, but the police flogging citizens of India is down right heinous. In movies, I have seen police brutality, but those are shown to be done in the confines of the cell or lockup. Here we are talking about creating a public spectacle. This is gross misuse of power and completely unconstitutional.&lt;/p&gt;
&lt;p&gt;The overarching signal I got was that government officials wanted to make a name for themselves in the context of religious extremism. Instead of doing their job of controlling crime, they were committing crime in the open, to earn brownie points from the majority population or their powerful leaders.&lt;/p&gt;
&lt;p&gt;While &lt;span class="bold-calm"&gt;&lt;a class="link" href="https://theprint.in/author/shekhargupta/" target="_blank" rel="noopener"
 &gt;Shekhar Gupta&lt;/a&gt;&lt;/span&gt; in his article laments about the lack of political voice to call out this atrocity, my worry is that the bureaucracy is not just corrupt now (which I think it was to a good extent). They have become bigoted and vain in the context of religion &amp;amp; minorities. There is a commission ordered for probe, but I don&amp;rsquo;t think there has been any real action taken. This makes me feel that the norm is changing. I am worried.&lt;/p&gt;
&lt;h2 id="broken-bridge"&gt;&lt;a href="#broken-bridge" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Broken Bridge&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;The reports on the bridge collapse were heart-wrenching. I have included some reports below which are really disturbing. The failures were at multiple levels.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The maintenance contract of the bridge was given to a watch company. I really can&amp;rsquo;t understand the sensibility in it.&lt;/li&gt;
&lt;li&gt;When the bridge was opened after maintenance, there was no checking or certification done by the Municipality.&lt;/li&gt;
&lt;li&gt;The crowd control on the bridge was not done properly.&lt;/li&gt;
&lt;li&gt;Many of the victims complain about delay in providing rescue.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This shows corruption and lack of any responsibility by the authorities at multiple levels. It looks like the municipal authorities were &amp;ldquo;busy&amp;rdquo; doing other things. I am not aware of what these are, but I have to wonder.&lt;/p&gt;
&lt;h2 id="what-do-i-make-of-this"&gt;&lt;a href="#what-do-i-make-of-this" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;What do I make of this?&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;I have related 3 different incidents happening in a chronological timeline. While these are disconnected incidents, there are a few thin strands. All have the bureaucracy involved it in some way. These incidents show corruption in the system (which has been there for long), but they don&amp;rsquo;t stop there. I feel there is some kind of posture change involved here. There seems to be misuse of power to target certain sections of society based on &amp;ldquo;specific criteria&amp;rdquo; instead of the earlier universal application of corruption. I am extremely worried about this.&lt;/p&gt;
&lt;p&gt;The Bureaucracy seems to think it is important to send the right signals to specific communities instead of ensuring that real work gets done, and the safety of people is ensured. I hope I am wrong, but the smoke does exist. If you think I am wrong, I would love to hear about it.&lt;/p&gt;
&lt;h2 id="references"&gt;&lt;a href="#references" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;References&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;&lt;span class="bold-green"&gt;Dismantling Bulldozer&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/theprint-essential/bulldozers-go-after-illegal-encroachments-from-mp-to-delhi-but-the-law-requires-a-notice/924105/" target="_blank" rel="noopener"
 &gt;ThePrint: Bulldozers go after ‘illegal encroachments’ from MP to Delhi, but the law requires a notice&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/politics/big-hit-with-bjp-bulldozers-now-rolling-in-gujarat-uttarakhand-coming-soon-to-karnataka/926715/" target="_blank" rel="noopener"
 &gt;ThePrint: Big hit with BJP, bulldozers now rolling in Gujarat &amp;amp; Uttarakhand, coming soon to Karnataka&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/india/bulldozers-in-shaheen-bagh-but-no-demolition-how-residents-averted-law-and-order-situation/948861/" target="_blank" rel="noopener"
 &gt;ThePrint: Bulldozers in Shaheen Bagh, but no demolition: How residents averted ‘law-and-order situation’&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://en.wikipedia.org/wiki/Bulldozer_politics" target="_blank" rel="noopener"
 &gt;Wikipedia: Bulldozer politics&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://thewire.in/rights/the-bulldozer-is-reshaping-our-cities-and-our-imaginations" target="_blank" rel="noopener"
 &gt;TheWire: The Bulldozer Is Reshaping Our Cities and Our Imaginations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;Public Flogging&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/india/gujarat-police-chief-orders-probe-into-kheda-flogging-incident-outfit-sends-legal-notices-to-dgp-govt/1158306/" target="_blank" rel="noopener"
 &gt;ThePrint: Gujarat police chief orders probe into Kheda flogging incident; outfit sends legal notices to DGP, govt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/india/new-sarpanch-vowed-to-start-garba-in-village-sparked-clashes-undhelas-muslim-residents-say/1159890/" target="_blank" rel="noopener"
 &gt;ThePrint: New sarpanch vowed to start garba in village, sparked clashes, Undhela’s Muslim residents say&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/india/gujarat-flogging-muslim-villagers-affidavit-blames-kheda-dsp-bjp-mla-undhela-sarpanch/1165029/" target="_blank" rel="noopener"
 &gt;ThePrint: Gujarat flogging: Muslim villager’s affidavit blames Kheda DSP, BJP MLA, Undhela sarpanch&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/national-interest/press-mute-for-indian-muslims-how-gujarat-flogging-shows-up-secular-silence-of-indian-politics/1168603/" target="_blank" rel="noopener"
 &gt;Press mute for Indian Muslims — how Gujarat flogging shows up ‘secular’ silence of Indian politics&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="bold-green"&gt;Broken Bridge&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/india/the-ruckus-that-led-to-gujarats-morbi-bridge-collapse-the-challenges-facing-rescue-teams/1188964/" target="_blank" rel="noopener"
 &gt;ThePrint: The ‘ruckus’ that led to Gujarat’s Morbi bridge collapse &amp;amp; the challenges facing rescue teams&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/india/kept-calling-but-nobody-came-morbi-bridge-survivors-stories-of-terror-abandonment/1192019/" target="_blank" rel="noopener"
 &gt;ThePrint: ‘Kept calling but nobody came’: Morbi bridge survivors’ stories of terror &amp;amp; abandonment&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/opinion/newsmaker-of-the-week/morbi-bridge-dents-not-just-the-gujarat-model-its-an-infrastructure-hole-india-cant-unsee/1198160/" target="_blank" rel="noopener"
 &gt;ThePrint: Morbi bridge dents not just the Gujarat model. It’s an infrastructure hole India can’t unsee&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/india/morbi-bridge-collapse-incident-highlights-cronyism-perpetuated-in-gujarat-says-cong/1217909/" target="_blank" rel="noopener"
 &gt;Morbi bridge collapse incident highlights cronyism perpetuated in Gujarat, says Cong&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/india/sc-terms-morbi-bridge-collapse-as-an-enormous-tragedy-asks-gujarat-hc-to-periodically-monitor-probe/1228367/" target="_blank" rel="noopener"
 &gt;SC terms Morbi bridge collapse as an ‘enormous tragedy, asks Gujarat HC to periodically monitor probe&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://theprint.in/india/gujarat-bridge-collapse-it-was-heart-wrenching-eyewitness-recount-morbi-horror/1188665/" target="_blank" rel="noopener"
 &gt;Gujarat Bridge Collapse: “It was heart wrenching…” eyewitness recount Morbi horror&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt;Aum sarvam SriKrishnarpanam astu&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Minimalism - My first brushstroke</title><link>https://www.nacnez.com/minimal-first-brushstroke.html</link><pubDate>Wed, 07 Sep 2022 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/minimal-first-brushstroke.html</guid><description>

&lt;div class="admonition tip"&gt;
 &lt;p class="admonition-title"&gt;TL;DR&lt;/p&gt;
 &lt;div class="admonition-content"&gt;Minimalism is a journey that can make life about living more by having less, and making it sustainable for everyone. Thanks to Leo Babauta for starting me on the path.&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;Minimalism as a concept has intrigued me for a long time. I bought a &lt;a class="link" href="https://www.goodreads.com/book/show/18077875-essentialism" target="_blank" rel="noopener"
 &gt;book&lt;/a&gt;, but did not read it. Then I watched a video on Netflix, and it was nice, but the concepts did not stick in my mind for long. Then I came across a book by &lt;a class="link" href="https://twitter.com/zen_habits" target="_blank" rel="noopener"
 &gt;Leo Babauta&lt;/a&gt; - &lt;span class="bold-green"&gt;The Simple Guide to Minimalist Life&lt;/span&gt;. I had read his &lt;a class="link" href="https://zenhabits.net/" target="_blank" rel="noopener"
 &gt;blog&lt;/a&gt; before and found his writing interesting. Hence, I decided this was an opportunity for me to wet my toes into this world.&lt;/p&gt;
&lt;p&gt;I read through the book, and there were several ideas and tips that I loved. So what is the next step. Writing about it is a good way for me to internalize some key ideas in it. Practising some of these ideas and sharing my experience with others, and getting thoughts and feedback would make things better. So here we are.&lt;/p&gt;
&lt;p&gt;This is not a review of the book - I am not a reviewer at any level. This is just a post written to learn and appreciate some aspects of the book which appealed to me and some of the learning I got when trying to follow some of these ideas.&lt;/p&gt;
&lt;h2 id="the-mental-picture"&gt;&lt;a href="#the-mental-picture" class="header-anchor"&gt;&lt;/a&gt;The Mental Picture
&lt;/h2&gt;
 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt;A minimalist instead embraces the beauty of less, the aesthetic of sparseness, a life of contentedness in what we need and what makes us truly happy.&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Minimalist room" src="https://www.nacnez.com/images/minimal/minimal_room_stock.jpg"/&gt;
 &lt;p class="caption"&gt;Minimalist room: Photo by &lt;a href="https://unsplash.com/@alexacea?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Alexandru Acea&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/minimalist-room?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;That quote describes a person I would aspire to be. It appeals to the romantic part of my mind. The line also makes me introspect. &lt;span class="bold-green"&gt;What makes me truly happy?&lt;/span&gt; It is a hard question to answer but a good one to reflect on. There is a lot of work to do, but I have gotten started. 👇&lt;/p&gt;
&lt;div class="figure"&gt;
 &lt;img alt="My current work desk at home" src="https://www.nacnez.com/images/minimal/my_curr_desk.jpeg"/&gt;
 &lt;p class="caption"&gt;My current work desk at home- I hope that is not too bad - except the wires!&lt;/p&gt;
&lt;/div&gt;
&lt;h2 id="things-i-own---my-focus-for-now"&gt;&lt;a href="#things-i-own---my-focus-for-now" class="header-anchor"&gt;&lt;/a&gt;Things I own - my focus for now
&lt;/h2&gt;&lt;p&gt;Leo covers a couple of aspects of minimalism in the book. One is about the things you own, and the other is about what you do. In this post, I am &lt;span class="italic-green"&gt;focusing on the &amp;ldquo;owning things&amp;rdquo;&lt;/span&gt; area. I will probably cover the other big piece in a different post.&lt;/p&gt;
&lt;h2 id="things-i-own---right-thinking--my-problems"&gt;&lt;a href="#things-i-own---right-thinking--my-problems" class="header-anchor"&gt;&lt;/a&gt;Things I own - Right Thinking &amp;amp; My Problems
&lt;/h2&gt;&lt;p&gt;The key idea to think and internalize in this space is &lt;span class="bold-green"&gt;Contentment&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;I have enough!&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Actualizing this idea is tougher than it looks. Let me talk about myself. I am pretty contented with what I have for the most part. I have a house to live in (though I live elsewhere); have a small car which I drive with my family. There is a reasonable amount of furniture, and I am not aspiring for anything fancy. I think I live well. There are small items which could be added (couple of good chairs wouldn&amp;rsquo;t go amiss), but it is not urgent. But there are gray areas where I falter, and I will discuss them down the line.&lt;/p&gt;
&lt;hr class="style-three"/&gt;
&lt;p&gt;One related idea which Leo talks here is the ability to differentiate between &lt;span class="italic-green"&gt;needs&lt;/span&gt; vs. &lt;span class="italic-green"&gt;wants&lt;/span&gt;. I confuse the two, not because I can&amp;rsquo;t identify the difference, but because there is some greed in me, which pops out when I am not cognizant of it. For practicing contentment, this ability to differentiate needs from wants needs to be high at all times. That does not happen, and I get carried away and make mistakes. Especially in those gray areas. Let us get to them.&lt;/p&gt;
&lt;hr class="style-three"/&gt;
&lt;p&gt;There are &lt;span class="bold-angry"&gt; two areas where I am very bad at following the rule of contentment &lt;/span&gt;. One is &lt;span class="bold-angry"&gt;books&lt;/span&gt;. Whenever I come across a book, I have the itch to own the book. I don&amp;rsquo;t literally mean every book, but any book which is even remotely interesting piques my interest. It starts with the thought that I would like to read them. Now, I cannot read them all because there is only so much time, so I decide to buy them for reading later. To sum it up, &lt;span class="bold-angry"&gt;I hoard books&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;span class="bold-angry"&gt;other gray area is gadgets &amp;amp; their accessories&lt;/span&gt;. I buy gadgets because I like them. But that is not all. I buy them because I want a backup in case things break. My &lt;span class="bold-angry"&gt;fear of things breaking is my excuse&lt;/span&gt; for buying more. You would say that &lt;em&gt;&amp;ldquo;I could live without it for sometime till I get a replacement&amp;rdquo;&lt;/em&gt;, and you would be right. But my stupid mind thinks differently.&lt;/p&gt;
&lt;p&gt;The other problematic thought is about &lt;span class="bold-angry"&gt;not wanting to spend a lot of money on these and ending up buying multiple cheap gadgets&lt;/span&gt;. This leads to clutter. Leo mentions that &lt;span class="bold-calm"&gt;&amp;ldquo;A minimalist values quality, not quantity, in all forms&amp;rdquo;&lt;/span&gt;. So my cheap gadget mentality does not help here. I am trying to change this, but it will take time. There is a whole other rant on quality which I want to get into, but now is not the time.&lt;/p&gt;
&lt;div class="figure"&gt;
 &lt;img alt="My set of bluetooth headsets" src="https://www.nacnez.com/images/minimal/my_bluetooth_hs.jpeg"/&gt;
 &lt;p class="caption"&gt;My set of bluetooth headsets&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;On the subject of gadgets, I have another related idiosyncrasy. &lt;span class="bold-angry"&gt;I keep broken gadgets.&lt;/span&gt; Many times it is because I don&amp;rsquo;t spend time checking for broken things. Other times, I have checked it, but I can&amp;rsquo;t let go of it. An example is the green one in the above picture.&lt;/p&gt;
&lt;p&gt;I probably have other shortcomings in this space and in my thinking. But these are at the top of my mind. Next let us move from thinking to actions.&lt;/p&gt;
&lt;h2 id="things-i-own-the-actions-i-took-or-can-take"&gt;&lt;a href="#things-i-own-the-actions-i-took-or-can-take" class="header-anchor"&gt;&lt;/a&gt;Things I own: The actions I took or can take
&lt;/h2&gt;&lt;p&gt;Garbage overwhelms us and hence we need to take some action. Leo suggests first decluttering to reduce stuff, and then talks about how to maintain the rest.&lt;/p&gt;
&lt;h3 id="decluttering"&gt;&lt;a href="#decluttering" class="header-anchor"&gt;&lt;/a&gt;Decluttering
&lt;/h3&gt;&lt;p&gt;For decluttering my setup at home or work, I need to do 2 things&lt;/p&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt;1. Identify the essential.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;2. Omit needless things&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;p&gt;For doing this, &lt;span class="bold-green"&gt;contentment&lt;/span&gt; needs to take center-stage in our minds. We already discussed contentment (keeping it DRY!) and I know I have work to do there.&lt;/p&gt;
&lt;p&gt;When we practically sit down to do this process of decluttering, we invariably will have some concerns. Leo calls it &lt;span class="bold-angry"&gt;fears&lt;/span&gt;, and he lists them out:&lt;/p&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt;1. Fear of needing it again &lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;p&gt;I have faced this fear whenever I have sat down to weed out things. Let me take an example: There is an HDMI port to HDMI port connector which I had used at some point for connecting my laptop to TV. I don&amp;rsquo;t use it anymore, but it is still lying around. I could actually get rid of it, but I have the fear of needing it again.&lt;/p&gt;
&lt;p&gt;One rule of thumb which Leo suggests here is &lt;span class="bold-calm"&gt; to check if you have used it in the last 6 months. If you have not used it then you can throw it away.&lt;/span&gt; I could follow this rule and potentially throw it away. But if my fear persists then there is the next technique - &lt;span class="bold-calm"&gt;&amp;ldquo;The maybe box&amp;rdquo;&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;The may be box is a place or container where you keep things which you may need at some point and are not willing to throw away. Ideally this is kept in a place which is away from your normal living area - &lt;span class="italic-green"&gt;the attic&lt;/span&gt;. I did use this hack, but &lt;span class="bold-angry"&gt;there is a demerit here - I have not truly decluttered my life, but have just hidden it&lt;/span&gt;. Unless I have a regular cleaning routine I will soon have an overflowing attic!&lt;/p&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Part of my attic" src="https://www.nacnez.com/images/minimal/part_of_my_attic.jpeg"/&gt;
 &lt;p class="caption"&gt;Part of my attic&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;To counter this risk, I do &lt;span class="italic-green"&gt;allocate time for attic cleaning&lt;/span&gt;, but I have to set up a monthly schedule to make it consistent.&lt;/p&gt;
&lt;p&gt;Let us get to the next fear.&lt;/p&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt; 2. Reluctance to waste something valuable&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;p&gt;I felt that this was a valid fear, in the beginning. My grandmother used to quote the below line to me in Tamil - &lt;span class="bold-angry"&gt;சிறு துரும்பும் பல் குத்த உதவும் &lt;/span&gt;. It literally means, even a small piece might be useful as toothpick. So theoretically it is valid concern. But something else happens in practice.&lt;/p&gt;
&lt;p&gt;We see something which is useful and keep it stored somewhere. It sits there collecting dust, eventually starts degrading and loses its value (stops working). While it may not be a good idea to throw a useful thing, &lt;span class="bold-green"&gt;it might be better to give it to somebody who can use it&lt;/span&gt;. But my childhood conditioning makes it very difficult for me to follow this. There are cases where I have practised this, but it is not always possible. One problem in practising the giving away part is that you don&amp;rsquo;t find any suitable recipient for the same. In such cases I keep it around, only to find later that the item stopped working, hence no longer useful, and can only be thrown away. This is why this fear needs to be overcome.&lt;/p&gt;
&lt;p&gt;Let us move to the last fear stated by Leo.&lt;/p&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt;3. Not wanting to let go of sentimental things, because of emotional connection&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;p&gt;I am not a very sentimental person, but there are occasions where I start seeing connection in things. It is primarily nostalgia. I still hang on to my eating plate even though it is a bit banged up because it was something which my father used.&lt;/p&gt;
&lt;div class="figure"&gt;
 &lt;img alt="The plate I use to eat my food" src="https://www.nacnez.com/images/minimal/my_plate.jpeg"/&gt;
 &lt;p class="caption"&gt;The plate I use to eat my food - broken in places and bent in others&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;As you can see the plate is very basic, but it is still usable. I don&amp;rsquo;t have another plate to use and that is by design. At some point the plate might become unusable, and I have to figure out a way to let it go. Leo has a good idea for this. He says that we could &lt;span class="bold-calm"&gt;take a photo for remembrance’s sake and then let go of the thing&lt;/span&gt;. I guess it could work. I may never look at the photo again, but at the moment when I have to part with the thing, it might offer me some kind of solace that I can look at its image later on. You could try it out and let me know if it works for you.&lt;/p&gt;
&lt;h3 id="keeping-things-well"&gt;&lt;a href="#keeping-things-well" class="header-anchor"&gt;&lt;/a&gt;Keeping things well
&lt;/h3&gt;&lt;p&gt;Now that we have identified the essential and omitted the unnecessary things, what is the next step in the process of becoming a minimalist in terms of owning things.&lt;/p&gt;
&lt;p&gt;The key idea which Leo mentions is to &lt;span class="bold-calm"&gt;&amp;ldquo;find a place for everything you need&amp;rdquo;&lt;/span&gt;. This is pretty good, but I feel the process has 3 steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span class="italic-green"&gt;Determine the things you need (only)&lt;/span&gt;: This was covered in the previous section (decluttering), but I am reiterating it here because if you have not done this then the next step does not work.&lt;/li&gt;
&lt;li&gt;&lt;span class="italic-green"&gt;Find a place for keeping those items&lt;/span&gt;: This is what Leo said (mentioned earlier), and it is a pretty clear. There is a &lt;span class="bold-angry"&gt;controversial&lt;/span&gt; statement which Leo makes in this context - &lt;span class="bold-calm"&gt;&amp;ldquo;Minimalising is the end of organizing&amp;rdquo;&lt;/span&gt;. &lt;span class="italic-green"&gt;The act of finding a place to keep the things you need feels like organizing to me&lt;/span&gt;. Having said that the actual work does not stop there.&lt;/li&gt;
&lt;li&gt;&lt;span class="italic-green"&gt;Have the discipline to keep the items in its place all the time&lt;/span&gt;: For me this is a vital step if not the vital step. If I am not disciplined to do this, then the previous steps don&amp;rsquo;t matter. I will pretty much be living in a cluttered place. Clearly &lt;span class="bold-green"&gt; Minimalism needs discipline &lt;/span&gt; and that is something we cannot forget.&lt;/li&gt;
&lt;/ol&gt;
&lt;hr class="style-one"/&gt;
&lt;p&gt;There is one tip I want to throw in the context of the &lt;span class="bold-green"&gt;decluttering&lt;/span&gt; process based on my experience. Whenever I embarked on this process, &lt;span class="bold-green"&gt;if I had good energy levels and a stable emotional state, I made better choices on keeping only things that are really necessary and throwing the rest&lt;/span&gt;. The decluttering process involves decision-making and if you are not in the right state, you will slow this process down to make it laborious and useless.&lt;/p&gt;
&lt;h2 id="sustainability"&gt;&lt;a href="#sustainability" class="header-anchor"&gt;&lt;/a&gt;Sustainability
&lt;/h2&gt;&lt;p&gt;One of the key themes which Leo talks prominently as a benefit of minimalism is &lt;span class="bold-calm"&gt;&amp;ldquo;Sustainability&amp;rdquo;&lt;/span&gt;. The world is stretched to its limits by the acts of humans like me. We really consume a lot of the resources available in the world. I don&amp;rsquo;t have numbers to quote, but my own life progression tells me that I am using a lot of resources.&lt;/p&gt;
&lt;p&gt;Leo says &lt;span class="bold-calm"&gt;&amp;ldquo;Step lightly upon this world&amp;rdquo;&lt;/span&gt; and I think it is a mantra for me to remember and follow:&lt;/p&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Sustainability" src="https://www.nacnez.com/images/minimal/sustainability.jpg"/&gt;
 &lt;p class="caption"&gt;Sustainability: Photo by &lt;a href="https://unsplash.com/@noahbuscher?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Noah Buscher&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/sustainability?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Creating macro changes to improve sustainability is difficult for me to do, but I can perform actions at my level. I can live with less. I have small house and a small car, but I can probably do better by reducing the other stuff I use. While there is the idea of using better materials (more earth friendly), I think there is an easier argument for &lt;span class="bold-green"&gt;using less&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;As part of his actions to take, Leo says, &lt;span class="bold-calm"&gt;&amp;ldquo;Make everything count&amp;rdquo;&lt;/span&gt;. Making everything which I have chosen to use, must be used well without wastage. And what is not useful should be given away so that somebody else who needs it could use it. This can also help with improving sustainability in the world.&lt;/p&gt;
&lt;h2 id="closing-thoughts"&gt;&lt;a href="#closing-thoughts" class="header-anchor"&gt;&lt;/a&gt;Closing thoughts
&lt;/h2&gt;&lt;p&gt;The best idea which Leo talks about in the book repeatedly is this:&lt;/p&gt;

 &lt;blockquote&gt;
 
 &lt;blockquote&gt;
 &lt;p&gt;&lt;span class="bold-calm"&gt;Edit, edit. Minimalism isn&amp;rsquo;t an end point. It&amp;rsquo;s a constant process of editing, revisiting, editing some more.&lt;/span&gt;&lt;/p&gt;

 &lt;/blockquote&gt;

 &lt;/blockquote&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Editing" src="https://www.nacnez.com/images/minimal/editing.jpg"/&gt;
 &lt;p class="caption"&gt;Editing life: &lt;a href="https://www.pexels.com/photo/rewrite-edit-text-on-a-typewriter-3631711/"&gt;Photo by Suzy Hazelwood&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;The clear point conveyed here is that &lt;span class="bold-green"&gt;Minimalism is a journey&lt;/span&gt;. I need to start somewhere and keep going. Things may not be perfect in the beginning (and it probably will never be), but as I progress, I can keep editing and refining the process to improve myself and the surrounding lives. It is a process of continuous improvement. The key ingredient needed to make this happen is &lt;span class="bold-green"&gt;self-discipline&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class="italic-green"&gt;I have started a routine of regularly decluttering my areas in the house. I have also found good places for the things I use. Now I need the discipline to make it stick.&lt;/span&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;I will write more about minimalism in terms of what I do at some point. In the meantime I want to listen to your thoughts on minimalism. Do you think the idea has any legs to stand? Are you already following it and if so what has been your experience? Please share as it will help me in my journey.&lt;/p&gt;</description></item><item><title>The Right size of a µService?</title><link>https://www.nacnez.com/micro-service-size.html</link><pubDate>Sat, 30 Jul 2022 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/micro-service-size.html</guid><description>&lt;p&gt;

&lt;div class="admonition tip"&gt;
 &lt;p class="admonition-title"&gt;TL;DR&lt;/p&gt;
 &lt;div class="admonition-content"&gt;There is no simple formula to figure out the right size of a microservice. There are different considerations, which affect size in different ways. This is illustrated in Fig 4 and 5. These figures provide you a bird&amp;rsquo;s eye view on the considerations you have to keep in mind.&lt;/div&gt;
&lt;/div&gt;



&lt;div class="admonition note"&gt;
 &lt;p class="admonition-title"&gt;Origin Note&lt;/p&gt;
 &lt;div class="admonition-content"&gt;I had given a session to my engineering team at &lt;a class="link" href="https://get-simpl.com/about.html" target="_blank" rel="noopener"
 &gt;Simpl&lt;/a&gt; on this topic as part of our Bi-Weekly Tech talks. Decided to create a blog post out of it since I (and others) can refer to it later.&lt;/div&gt;
&lt;/div&gt;
&lt;/p&gt;
&lt;p&gt;I have been working with microservices for some time. There is one question that keeps coming back when I work with them or discuss them with people. How small or big a microservice needs to be? The below blog post is my attempt to explain (&amp;amp; understand) the concepts around this &amp;amp; express my opinions/inferences along with it.&lt;/p&gt;
&lt;p&gt;At the outset, I need to establish some context about microservices. A very short journey into history &amp;amp; a foray into the realm of definitions will help us understand the core topic better.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="before-microservices-there-was"&gt;&lt;a href="#before-microservices-there-was" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Before microservices there was&amp;hellip;&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Microservices have been around for some time now, but they are relatively nascent compared to these older fellows which I am going to describe now.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;At the beginning of time there was Client Server architecture!&lt;/em&gt; Ok, that is not the truth, I have only gone back a few decades here. There were other architecture styles before, but they are not relevant to our conversation. Also, I am not explaining the entire computing history. The two relevant architecture styles are listed below:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;N-tier architecture (client/server?)&lt;/li&gt;
&lt;li&gt;Service Oriented architecture&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let us dig a little deeper.&lt;/p&gt;
&lt;h3 id="n-tier-architecture"&gt;&lt;a href="#n-tier-architecture" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;N-tier Architecture&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;This architecture started off as the basic client server architecture which is two tiers. It was just a thick client which talked to a server typically for data storage. This obviously had some problems &amp;amp; hence things evolved. Cutting things short, we get to the final (or at least prevalent) incarnation of this architecture: the 3 tier architecture.&lt;/p&gt;
&lt;p&gt;The tiers in a 3 tier architecture are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A thin client, like the browser&lt;/li&gt;
&lt;li&gt;A thick middle tier server component, which held all the business logic&lt;/li&gt;
&lt;li&gt;A data store, which held all the data.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="figure"&gt;
 &lt;img alt="N tier architecture" src="https://www.nacnez.com/images/ms_size/n_tier_architecture.png"/&gt;
 &lt;p class="caption"&gt;Fig 1: N(3) Tier Architecture&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;I am sure this is familiar to all of you as it is a valid architecture style even today. Monoliths were/are basically 3 tier applications in all their pomp &amp;amp; glory (and extra cheese!). Actually, many of the microservices today follow the same architecture.&lt;/p&gt;
&lt;p&gt;The 3 tier architecture was embraced wholeheartedly by the software community. Advanced middle tier components called application servers got built with tonnes of features, to make it easy for developers to deploy 3 tier applications. This lead to creation of highly capable applications which can deliver a lot of useful functionality to multiple thin clients.&lt;/p&gt;
&lt;p&gt;Lo &amp;amp; Behold! The &lt;span class="bold-angry"&gt;Monolith&lt;/span&gt; was born!&lt;/p&gt;
&lt;h3 id="service-oriented-architecture"&gt;&lt;a href="#service-oriented-architecture" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Service Oriented Architecture&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;I think this architecture&amp;rsquo;s inception happened like this (purely a figment of my imagination) :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Software people always want to reuse code &amp;amp; leverage functionality in other existing applications without having to change them much (so use them remotely).&lt;/li&gt;
&lt;li&gt;Software people always like to componentize things.&lt;/li&gt;
&lt;li&gt;These folks come across XML &amp;amp; figured out that this language can be used to represent any piece of data &amp;amp; can be read by any tech (&lt;span class="small-italicized-green"&gt;Side note: there was a platform war going on at that time in tech history just like now there is cloud war going on&lt;/span&gt;).&lt;/li&gt;
&lt;li&gt;Then they put all these together &amp;amp; SOA was born.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I am just making this up and hence will be missing a lot of details (the individual aspects mentioned here are true but the story itself is fictional).&lt;/p&gt;
&lt;p&gt;One key thing I did not specify yet are the &lt;span class="bold-calm"&gt;Service Design principles&lt;/span&gt; which are very important (according to me). So let us focus on them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Standard contract &amp;amp; Service abstraction&lt;/li&gt;
&lt;li&gt;Service autonomy (implementation &amp;amp; location)&lt;/li&gt;
&lt;li&gt;Service discoverability&lt;/li&gt;
&lt;li&gt;Service statelessness&lt;/li&gt;
&lt;li&gt;Service composability&lt;/li&gt;
&lt;li&gt;Service reusability&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you look at these principles, they all make sense even today. Don&amp;rsquo;t they? I would even wager that they make even more sense today. Especially in the context of microservices.&lt;/p&gt;
&lt;hr class="style-three"/&gt;
&lt;div class="figure align-right"&gt;
 &lt;img alt="Service Oriented Architecture" src="https://www.nacnez.com/images/ms_size/soa.jpeg"/&gt;
 &lt;p class="caption"&gt;Fig 2: Service Oriented Architecture&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;While the SOA principles were (/are) very strong, the real world implementations got ugly soon. Given the enterprise focus of SOA, things changed for the worse. Enterprises already had a lot of software applications lying around &amp;amp; working in silos. Software Vendors took the SOA&amp;rsquo;s promise of reusability &amp;amp; interoperability &amp;amp; created all sorts of products (read ESB 😖) which were supposed to help these enterprises to leverage these siloed apps. This did not go as planned since such a transformation requires a lot of fundamental change in how these enterprises work, which mere tools can&amp;rsquo;t make happen. Enterprises made a lot of upfront investment on these vendor products expecting them to do some kind of magic. Of course, they did not get much out of it in the timeline they wanted it on. Not only that, these products became single point of failures (both from a dev &amp;amp; runtime perspective).&lt;/p&gt;
&lt;p&gt;Apart from the above progression, there was one more issue. To solve a wide range of problems in these products &amp;amp; in general within SOA, many standards were evolved (WS*). While this effort was admirable, it did not sit well with developers since it meant a lot of complex artifacts added, which felt like boilerplate since they did not add visible value.&lt;/p&gt;
&lt;p&gt;All said and done, I don&amp;rsquo;t think SOA is dead. It has just morphed to what is called &lt;span class="bold-green"&gt;microservices&lt;/span&gt; now (my opinion).&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="why-microservices-instead-of-monolith"&gt;&lt;a href="#why-microservices-instead-of-monolith" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Why microservices (instead of monolith)&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;I am not going to explain the microservice architecture since in today&amp;rsquo;s world everyone has a pretty good idea about it. Instead, I am going to explore the reasons why microservices are preferred over monoliths. I get into this, because these attributes come into play when we eventually want to figure out the right size of a microservice. Remember when a microservice gets too big, it becomes a monolith. (&lt;span class="small-italicized-green"&gt;When it gets too small then it becomes a nano/pico service&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;There are some well known reasons for preferring microservices:&lt;/p&gt;
&lt;h3 id="1-independent-deployment"&gt;&lt;a href="#1-independent-deployment" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;1. Independent Deployment&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Microservices are fantastic because they allow for independent deployment of specific changes. When a feature requires localized changes on a particular module (or code path), a microservice (which represents that module) will allow us to deploy that part alone (by deploying the microservice) instead of deploying the entire functionality (app) which is required in case of a monolith. This plays out in many business scenarios.&lt;/p&gt;
&lt;p&gt;This is a pretty crucial aspect of a microservice. If this is not realized then the point of having microservices is lost.&lt;/p&gt;
&lt;h3 id="2-freedom-of-tech-choices"&gt;&lt;a href="#2-freedom-of-tech-choices" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;2. Freedom of tech choices&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Given that microservices focus on a smaller cohesive footprint, they allow for more flexibility in tech choices. As they say, you can use the right tool for the job!&lt;/p&gt;
&lt;h3 id="3-easy-replaceability"&gt;&lt;a href="#3-easy-replaceability" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;3. Easy replaceability&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The ability to take a microservice out &amp;amp; replace it with a new one, in a relatively short amount of time, is cool. This is of course not possible with a monolith. This is another key aspect of a microservice. It allows us product developers to make mistakes &amp;amp; correct them.&lt;/p&gt;
&lt;p&gt;Having said that, in the real world, we forget this &amp;amp; expect that everything works perfectly, the first time. Rewriting or replacing is always considered as an unacceptable thing. This defeats one of the great benefits of microservices - the ability to make a mistake &amp;amp; learn from it.&lt;/p&gt;
&lt;h3 id="4-shorter-time-to-market"&gt;&lt;a href="#4-shorter-time-to-market" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;4. Shorter time to market&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Microservices allow for a focused approach. Whenever the business wants to create a new feature, the focus of the corresponding team &amp;amp; its microservice(s) allows them to independently build out the feature &amp;amp; release it. This means that we are faster to market.&lt;/p&gt;
&lt;h3 id="5-independent-scaling"&gt;&lt;a href="#5-independent-scaling" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;5. Independent scaling&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;In my experience, this is the favorite reason people think about &amp;amp; give others, when wanting to create microservices. Scaling is a problem everybody wants to have &amp;amp; solve. The microservice architecture&amp;rsquo;s capability of making this happen is the most important reason for everyone to flock to this architecture style.&lt;/p&gt;
&lt;p&gt;Many times this solution leads people down the path of very small services (nano/pico services) which may not really solve the actual scalability problem. That said, no one can refute that microservice architecture when applied correctly can provide you ways to independently scale different parts of the bigger system, and that, is surely an advantage.&lt;/p&gt;
&lt;hr class="style-three"/&gt;
&lt;p&gt;Now that the obvious ones are done, there are some advantages of microservices which are important but not appreciated as much:&lt;/p&gt;
&lt;h3 id="1-organized-around-business-capabilities"&gt;&lt;a href="#1-organized-around-business-capabilities" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;1. Organized around Business Capabilities&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The premise of a microservice is that it is organized around business capabilities. For example, you might create a microservice for payment management (&lt;em&gt;&amp;lsquo;Payments&amp;rsquo;&lt;/em&gt;) &amp;amp; another for order management (&lt;em&gt;&amp;lsquo;Orders&amp;rsquo;&lt;/em&gt;). Each of these are distinct business capabilities and have different concerns, interactions &amp;amp; business focus. This type of organization leads microservices to evolve independently based on what a particular business team (domain experts) wants to do in that specific area.&lt;/p&gt;
&lt;p&gt;For example, if we want to use a different payment gateway because it provides better success rates, it is the &lt;em&gt;&amp;lsquo;Payments&amp;rsquo;&lt;/em&gt; microservice which will work &amp;amp; evolve this feature. The &lt;em&gt;&amp;lsquo;Orders&amp;rsquo;&lt;/em&gt; microservice does not bother about this.&lt;/p&gt;
&lt;p&gt;Also, by doing this there is easier alignment of engineering teams with business goals, and it helps the team to build domain specific knowledge, which can help in making quicker &amp;amp; better decisions during development.&lt;/p&gt;
&lt;p&gt;Some earlier mentioned benefits like &lt;em&gt;shorter time to market&lt;/em&gt;, &lt;em&gt;independent deployment&lt;/em&gt; etc. work because of this aspect of microservices.&lt;/p&gt;
&lt;h3 id="2-strong-interfaces"&gt;&lt;a href="#2-strong-interfaces" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;2. Strong Interfaces&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Once you go down the path of microservices, we would have split a large app into smaller services. The interactions between them need to happen remotely through an interface. This interface has to be clearly defined, is generally coarse grained, and all interactions happen only through it.&lt;/p&gt;
&lt;p&gt;While we don&amp;rsquo;t want too many such interactions happening for fulfilling a single user action, when these calls do happen, they happen in a well-defined &amp;amp; clear manner. This reduces coupling between systems. Also, with proper microservices we reduce the creeping up of multiple concepts within a single service which removes cognitive overload.&lt;/p&gt;
&lt;p&gt;In summary, two different microservices or sub-systems always talk to each other through strong well-defined interfaces. This leads to a lot of good things in the life of developers of both systems.&lt;/p&gt;
&lt;h3 id="3-decentralized-governance"&gt;&lt;a href="#3-decentralized-governance" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;3. Decentralized governance&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;We already covered the fact that there is freedom of choice in terms of technologies used when we use microservices. That is part of governance, but that is not all of it. With microservices, individual microservice teams can even choose different processes &amp;amp; tools to run their development.&lt;/p&gt;
&lt;p&gt;While, there needs to be a set of guidelines &amp;amp; some basic oversight to ensure that &lt;em&gt;the fruit does not fall too far away from the tree&lt;/em&gt;, the need to govern everything through &lt;span class="bold-angry"&gt;&lt;strong&gt;committee&lt;/strong&gt;&lt;/span&gt; is reduced. This means that the dimensions of freedom for teams are much higher, leading to a more agile engineering organization.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="what-does-micro-mean"&gt;&lt;a href="#what-does-micro-mean" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;What does “micro” mean?&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Now that we have covered why microservices, let us move back towards the question of this write-up. What does &amp;ldquo;micro&amp;rdquo; mean in a microservice? What is the right size of a microservice?&lt;/p&gt;
&lt;p&gt;The rest of the blog post is about answering that in detail. But to start off, I thought that I could briefly cover some points which people say about size of microservices. I am mentioning the extreme ones here because that has been my experience. More reasonable ideas on the right size of microservices will be presented down the line.&lt;/p&gt;
&lt;h3 id="200-lines-of-code-"&gt;&lt;a href="#200-lines-of-code-" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;200 Lines of Code 😖&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;One of the metrics people use to talk about microservice size is lines of code. There are claims that microservices should be only 200 lines. There are others who say it can be 500 or 1000 lines. These absolute values don&amp;rsquo;t make sense to me, because lines of code can vary a lot depending on the language platform &amp;amp; the frameworks used in development. If I am building something using say, the RoR stack, a few lines of code would be enough to create a complete CRUD app. If I use direct Golang or C to build the same app the line of code required might be order of magnitude higher. So defining microservice size using lines of code count does not make sense to me.&lt;/p&gt;
&lt;h3 id="a-person-per-service-"&gt;&lt;a href="#a-person-per-service-" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;A person per service 😕&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Another famous one I have heard about the right size of a microservice is that it can be managed by a single person for the most part. This again does not make a lot of sense to me. Microservices are supposed to represent business functions. Typically, in any normal business function (unless you are very small startup), the processes followed are involved &amp;amp; are typically managed by multiple people. One developer catering to all these needs does not sound feasible to me.&lt;/p&gt;
&lt;h3 id="an-endpoint-per-service-"&gt;&lt;a href="#an-endpoint-per-service-" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;An endpoint per service 😩&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The third kind of logic I have heard is to split things up in such a way that a service only serves one endpoint. The argument is that one can scale this independently &amp;amp; hence it gives us a lot of advantage.&lt;/p&gt;
&lt;p&gt;For me this setup does not make sense most of the time. If there is a business domain that only serves one API endpoint, I would be very surprised. There are potential niche domains for which this might happen. Even so, one API endpoint is cutting it too small. In my experience, I have never seen such a domain &amp;amp; I would love to hear from others if such domains exist.&lt;/p&gt;
&lt;p&gt;There are other ideas of splitting the same domain into multiple services (since the domain needs more than one endpoint). This is a valid idea but when I probe deeper with these advocates, I find them expressing the idea of sharing a data store (database) across all these services. Once that happens, I find it difficult to stay with them. Sharing a data store breaks one of the fundamental principles of microservices - autonomy. That is not acceptable to me. So I walk away from the idea.&lt;/p&gt;
&lt;hr class="style-three"/&gt; 
&lt;p&gt;None of these ideas on the right size of microservices are good according to me (making it explicit in case my subtle hints were not clear enough), though I have heard them often. Now I will start describing some better ideas to figure out the right size of a microservice. But before I do that (&lt;span class="small-italicized-green"&gt; not again! &lt;/span&gt;), I want to take an important digression. This digression is about Domain driven design, and to me, it is one of the vital ideas in the area of microservices.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="domain-driven-design"&gt;&lt;a href="#domain-driven-design" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Domain driven design&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Domain driven design is a methodology or approach of developing software that focuses on a creating a software based model of the actual domain it is representing, thereby making the software model rich in concepts, processes &amp;amp; rules of the domain. It all started with &lt;a class="link" href="https://www.amazon.in/gp/product/B00794TAUG" target="_blank" rel="noopener"
 &gt;a book created by Eric Evans&lt;/a&gt;.&lt;/p&gt;
&lt;div class="figure align-right"&gt;
 &lt;img alt="Domain Driven Design by Eric Evans: Model Integrity Patterns" src="https://www.nacnez.com/images/ms_size/ddd.png"/&gt;
 &lt;p class="caption"&gt;Fig 3: Domain Driven Design by Eric Evans: Model Integrity Patterns&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;This book focused on a bunch of concepts which I will describe very briefly in this write-up. I am touching this area of study because I think it is relevant to our topic - microservice &amp;amp; it&amp;rsquo;s right size. A detailed description is just not possible in this post. Given that more than one books have been written on the topic, there are multiple articles, courses etc. (and also communities), I will ask you to dive into one (or more) of them. &lt;span class="small-italicized-green"&gt; May be down the line I will attempt to write something about it &lt;/span&gt;. Let us move to the crash course on the subject:&lt;/p&gt;
&lt;h3 id="bounded-contexts"&gt;&lt;a href="#bounded-contexts" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Bounded Contexts&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;One of the key ideas in domain driven design (DDD) is to organize large systems according to their business domains. As soon as I say this, I am sure you would realize that this is fantastic in the context of microservices. Microservices are also organized around business capabilities, so this seems like a good match to start with.&lt;/p&gt;
&lt;p&gt;Within the context of a business area, we can define a domain model that makes sense within that context. Outside that context these domain concepts generally don&amp;rsquo;t make clear sense. Or at least they make different sense in different contexts. This boundary is defined as a &amp;ldquo;Bounded Context&amp;rdquo; &amp;amp; it is focused on a single domain. If you think a little, this idea is the foundation of microservices. A bounded context can be built using one or more microservices.&lt;/p&gt;
&lt;h3 id="ubiquitous-language"&gt;&lt;a href="#ubiquitous-language" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Ubiquitous Language&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The next important concept of DDD is called the Ubiquitous Language. As the name suggests this means a language that is used across teams and disciplines - ubiquitous. It is a common language for developers &amp;amp; domain experts and is used to express business concepts &amp;amp; rules of the domain. The same language is also used to express concepts/rules in the software domain model. Let me reiterate: The idea is that software uses the terminology present in the business domain &amp;amp; makes it easy for business experts to understand the software as well.&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt; This one does not contribute too much to the microservice architecture discussion, but I mentioned here because it is of fundamental importance in DDD. &lt;/span&gt;&lt;/p&gt;
&lt;h3 id="context-maps"&gt;&lt;a href="#context-maps" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Context maps&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Any given business organization or super system is made up of multiple bounded contexts. There needs to be a way to describe how interactions between different bounded contexts happen. In the context of DDD, this interaction is expressed as Context maps. Context maps are very powerful to understand the business systems. It can also be very handy in figuring out our microservices. A context map could help us understand how our microservices work together, how they interact, their communication patterns, build and runtime dependencies etc.&lt;/p&gt;
&lt;h3 id="aggregates"&gt;&lt;a href="#aggregates" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Aggregates&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;There is one more important idea in DDD that I need to discuss here: &lt;span class="bold-green"&gt;&amp;ldquo;Aggregate&amp;rdquo;&lt;/span&gt;. This is one of the tactical design patterns presented in the DDD book. An aggregate represents a composite domain object which can contain one or more &amp;ldquo;entities&amp;rdquo; or &amp;ldquo;value objects&amp;rdquo; &lt;span class="small-italicized-green"&gt;(these are other tactical patterns in DDD which I won&amp;rsquo;t cover)&lt;/span&gt; &amp;amp; ensures that invariants across these composed objects are kept intact. It also represents a consistency boundary.&lt;/p&gt;
&lt;p&gt;An example could be an &lt;em&gt;&amp;lsquo;Order&amp;rsquo;&lt;/em&gt; &amp;amp; its &lt;em&gt;&amp;lsquo;LineItems&amp;rsquo;&lt;/em&gt;. One of the rules/invariants could be the value of the order should be equal to sum of the values of its line items.&lt;/p&gt;
&lt;hr class="style-three"/&gt; 
&lt;p&gt;These are some key ideas of DDD &amp;amp; I have described them only as much as I require for explaining how they affect microservices &amp;amp; their size. There is a lot more to dig deeper in this area &amp;amp; I will provide references for the same, later in this write-up.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="what-is-the-right-microservice-size---considerations"&gt;&lt;a href="#what-is-the-right-microservice-size---considerations" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;What is the right microservice size? - Considerations&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;Now that we are done with all the ceremony, we can get into the main discussion. Though I call it ceremony, I think the previous sections are relevant &amp;amp; will make this section much simpler to explain &amp;amp; understand. The following are the ideas, which we have to keep in mind when we think about the size of a microservice - how micro is micro?&lt;/p&gt;
&lt;h3 id="bounded-contexts-1"&gt;&lt;a href="#bounded-contexts-1" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Bounded Contexts&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;I covered bounded contexts in the earlier section. As I mentioned there, a microservice can contain a maximum of one bounded context. A bounded context represents a business domain &amp;amp; hence having a microservice representing more than one business domain defeats the main purpose of microservices - independence &amp;amp; autonomy. If two bounded contexts are present within a single microservice and one business team focused on a particular context wants changes on their aspects, then that will need to be synced with the needs of the other team &amp;amp; their bounded context. While keeping separate microservices does not guarantee that different business teams can work independently all the time, it takes it towards the best possible outcome.&lt;/p&gt;
&lt;h3 id="transaction-boundaries--consistency"&gt;&lt;a href="#transaction-boundaries--consistency" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Transaction Boundaries &amp;amp; Consistency&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;While the bounded context acts as a force on the upper bound of size for a microservice, the need to ensure that transactions work properly &amp;amp; data consistency is maintained in a given use case acts as a force on the lower bound.&lt;/p&gt;
&lt;p&gt;There was a time when Java EE world thought they solved distributed transactions with 2 phase commit &amp;amp; everyone should be happy. But everyone was not happy. Scalability challenges &amp;amp; complexity of the architecture did not help the cause. Also, the solution of platform specific and everyone did not want to move to the Java EE stack for their own valid reasons.&lt;/p&gt;
&lt;p&gt;As of today distributed transactions are not a solved problem at a tech level (there are patterns like Saga which help, but they add to the complexity). So if we want a user interaction to be properly managed as a transaction &amp;amp; consistency to be maintained for the data, then that interaction must not span microservices. It should begin &amp;amp; end within one microservice. If that does not happen then data consistency &amp;amp; good user experience cannot be guaranteed. &lt;em&gt;Somehow in today&amp;rsquo;s world these things have become important!&lt;/em&gt; So this is a criterion to keep in mind to keep the service big enough.&lt;/p&gt;
&lt;p&gt;The concept of an aggregate plays well in this aspect. Since an aggregate is a consistency boundary, a microservice that contains at least one entire aggregate and no partial aggregates, can meet this criterion. If an aggregate is split up into two microservices then it can cause havoc. So aggregate size acts as a lower bound to the size of a microservice.&lt;/p&gt;
&lt;h3 id="infrastructure-aspects"&gt;&lt;a href="#infrastructure-aspects" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Infrastructure Aspects&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;A new microservice typically needs a set of infrastructure components. There are the basic compute, memory &amp;amp; network needs and things generally don&amp;rsquo;t stop there. Most of these microservices will need other elements like databases &amp;amp; caches, and those need to be considered as part of infrastructure needs. And it does not stop here.&lt;/p&gt;
&lt;p&gt;        If you are going to develop &amp;amp; run a microservice, then a team needs to work on it. It needs to build, test &amp;amp; work with it. This means more infra needed for various environments like development, staging, testing etc. Keeping this in mind, creation of tiny microservices means adding to overhead in terms of infra needs. Our IT or Devops team may not be happy about it.&lt;/p&gt;
&lt;p&gt;Having said all this, the current cloud based world (with spot instances &amp;amp; server-less infrastructure) makes this somewhat easier to manage or handle. But I still think it involves significant work &amp;amp; hence cannot be treated as a non-reason when it comes to creating microservices &amp;amp; their corresponding &lt;em&gt;small&lt;/em&gt; size.&lt;/p&gt;
&lt;p&gt;So before you think that I will split up the service to make it smaller keep the infra requirement in mind.&lt;/p&gt;
&lt;h3 id="iteration-speed--agility"&gt;&lt;a href="#iteration-speed--agility" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Iteration speed &amp;amp; Agility&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;One of the key purposes of creating microservices in an organization is to be able to improve its agility &amp;amp; iteration speed. An ideal microservice, which focuses on a specific business function, allows that function to quickly add new changes that can be shipped to customers to get quick feedback. This ability to ship a product/feature &amp;amp; get quick feedback is the hallmark of agility. This increased iteration speed is what allows organizations to keep ahead of their competition. The microservice architecture&amp;rsquo;s key benefit is to allow this to happen.&lt;/p&gt;
&lt;p&gt;In terms of &lt;em&gt;&amp;lsquo;right-sizing&amp;rsquo;&lt;/em&gt; the microservice, this is another guiding principle. If the microservice size still allows our team to deliver in an agile manner then we are safe with its size. If it is slowing things down then it is potentially time to look at making changes to the size of the service (either split them or combine them). This consideration is slightly indirect but if we track our agile processes properly then this can be an eye-opener to determine microservice size.&lt;/p&gt;
&lt;p&gt;Couple of opposing forces to note in this context:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Typically, when services grow big, testing all the scenarios takes more time. So &lt;span class="bold-green"&gt;testing time&lt;/span&gt; increases with the size and hence it pushes services down to make them smaller.&lt;/li&gt;
&lt;li&gt;If a feature change needs developers to work with multiple services (within the same team) to release it, then overall &lt;span class="bold-green"&gt;development time&lt;/span&gt; increases. Developers have to work with all the services individually, test against their contracts (with &amp;amp; without mocks/stubs), deploy in different environments in a co-ordinated manner and also ensure distributed communication scenarios are handled. So if we want &lt;em&gt;development time&lt;/em&gt; to be reduced within a context of business team it might be better to have a bigger service that caters to that business function fully.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id="team-size-two-pizzas-team"&gt;&lt;a href="#team-size-two-pizzas-team" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Team Size (Two Pizzas team)&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;This criterion speaks a lot to engineering managers. Every manager wants to have a clear idea on the right (or good) team size for managing a microservice. The accepted intelligence out there is that a microservice team has as many members as can be fed by &lt;strong&gt;&amp;ldquo;two pizzas&amp;rdquo;&lt;/strong&gt;. This means a size of around 6 - 10 members (few indicate that it can be up to 12 members). &lt;span class="small-italicized-green"&gt;The original quote of &amp;ldquo;Pizza teams&amp;rdquo; came from Jeff Bezos.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;From an agile team perspective, who constitutes a team? Is it the set of developers in the team? What about testers? What about engineering managers &amp;amp; product owners? In the literature out there, this aspect is not clear. So I am going to wing this part, based on my experience &amp;amp; intuition.&lt;/p&gt;
&lt;p&gt;For me, an agile team which takes care of a business focus area or a domain should be the set of people who interact &amp;amp; communicate about it on a daily basis. Developers, testers &amp;amp; product owner(s), all form part of that team. Developers are focused in creating the feature, the testers are focused on ensuring quality of the feature &amp;amp; the product owner is the one responsible for envisioning the feature (&lt;span class="small-italicized-green"&gt;I say &amp;lsquo;responsible&amp;rsquo; to differentiate the fact that she does not have to be the only person doing the thinking, but she takes charge of the process&lt;/span&gt;). These members focus on the service/business area day in &amp;amp; day out. Another important criteria of an agile team is that they are self-managed.&lt;/p&gt;
&lt;p&gt;         If these two criteria are met, then those are the team members that manage the bounded context &amp;amp; they can be as big as 6 - 10 members. Let me summarize the types of people in the team so far (they are just in alphabetical order):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Developers&lt;/li&gt;
&lt;li&gt;Product Owner(s)&lt;/li&gt;
&lt;li&gt;Testers&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;     You might ask: What about the engineering manager? If the engineering manager is solely focused on the team &amp;amp; contributing to the teams work on a regular basis then they could also be considered in the 10 member gang. But if they have a broader focus &amp;amp; are indirectly involved with the team and engage at higher level, then I would consider them to be sitting outside the 10 member team. Similar approach can be applied to members from Devops, Security etc.&lt;/p&gt;
&lt;p&gt;Back to the microservice size question. This agile team is focused on a bounded context/domain &amp;amp; hence need to manage one or more services within itself. It is ok for the team to manage just one service which takes care of all of business functions. Or the team might decide that it needs to manage it using 2 - 4 services. Either way, things work.&lt;/p&gt;
&lt;p&gt;What does NOT work is this: For managing this domain specific service, if we start needing a team bigger than 10 people, then it may be time to split things up. This splitting up is not just about the service. If I need a team bigger than 10 people to manage a business subdomain then it means that the domain is more nuanced and/or broad. So the business needs to look at how to split the business function up to provide better focus on each of these parts. This part is purely my own opinion &amp;amp; hence subject to disagreement. I am ok with that.&lt;/p&gt;
&lt;p&gt;The one thing we should not forget from this section is that team size acts as an upper limit determinant of microservice size and pushes it down.&lt;/p&gt;
&lt;h3 id="modularization"&gt;&lt;a href="#modularization" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Modularization&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;The concept of modularization is well known to a lot of us. We want modularization because it helps us to understand things easily &amp;amp; reuse things. Also, modules operate with each other through contracts, and contracts are always a good thing. Creating small modules to make a big system is not a new idea. It has been around for long.&lt;/p&gt;
&lt;p&gt;Microservices take this to the next level where they are &lt;span class="bold-calm"&gt;reusable deployed modules&lt;/span&gt; which can be used by others through &lt;em&gt;an API contract&lt;/em&gt;. When a developer is working within a module, she doesn&amp;rsquo;t have to keep in mind a lot of other (external) concepts but can focus on only the ones that make sense in the given context.&lt;/p&gt;
&lt;p&gt;When people use normal modules (that are not microservices) in an application, they tend to be less disciplined in their usage of other module code. They just import it anywhere they want &amp;amp; start using it as they like. This increases the coupling between modules. Microservices stop this kind of undisciplined usage since calling a microservice is a network call (&lt;span class="small-italicized-green"&gt;there are associated costs&lt;/span&gt;) &amp;amp; it is generally done through a very strict contract (interactions typically happen using a specific pattern - client). This means that developers will adhere to module boundaries, and will be deliberate about module usage.&lt;/p&gt;
&lt;p&gt;From a size perspective, small modules are always good. So as per modularization, small microservices are also good. That said modules need to be cohesive things which expose a single responsibility (or a single set of them). That applies to microservices too &amp;amp; if you can find the smallest cohesive set of functionality then we can make it into a microservice. In summary, modularization tend to make services smaller and push on upper bound to make things smaller.&lt;/p&gt;
&lt;p&gt;The story does not stop here. Let us continue to the next one.&lt;/p&gt;
&lt;h3 id="refactorability"&gt;&lt;a href="#refactorability" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Refactorability&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Refactorability as a term feels odd from an English perspective, but makes some sense from a perspective of developer. The way I understand it is that, it refers to the ability of a codebase to lend itself to easy refactoring. This ability depends on a lot of things. Generally good IDEs &amp;amp; editors provide this ability &amp;amp; they generally work better in the case of statically typed languages.&lt;/p&gt;
&lt;p&gt;As a developer, refactoring code within a project, to create some clean &amp;amp; readable code has been one of the best joys I have experienced in my career. It rivals &lt;span class="small-italicized-green"&gt;(even beats it sometimes)&lt;/span&gt; the feeling of building something completely from scratch.&lt;/p&gt;
&lt;p&gt;Now back to the process of refactoring. Irrespective of the development platform, most of the IDEs allow you to refactor code within a project. They generally don&amp;rsquo;t allow you to refactor code across multiple projects. This is even more true in case these multiple projects refer to different microservices which are integrating over a structured contract made up of say JSON and are potentially implemented in different platforms.&lt;/p&gt;
&lt;p&gt;While from a modularity standpoint, creating smaller &amp;amp; focused microservices is a good thing, when you do that, you tend to lose out the ability to easily refactor code. This again increases &lt;span class="bold-green"&gt;development time&lt;/span&gt; and hence something to consider.&lt;/p&gt;
&lt;p&gt;So don&amp;rsquo;t make microservices so small that refactoring is very difficult. This generally won&amp;rsquo;t be problem if the concerns of microservices are quite separate (then they won&amp;rsquo;t have much commonality to refactor). To sum up, modularization is great, but it needs to be balanced with refactorability.&lt;/p&gt;
&lt;h3 id="scaling"&gt;&lt;a href="#scaling" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Scaling&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;One of the key reasons for creating microservices is the ability to independently scale small services as per their needs. Please take special note of the word &lt;span class="bold-calm"&gt;independently&lt;/span&gt; in that sentence. When we say we can &amp;lsquo;independently&amp;rsquo; scale, it should not just be a theoretical possibility. Creating small microservices that can scale separately since they deal with independent business use cases, is a good idea. But if that is not the case then there is a problem.&lt;/p&gt;
&lt;p&gt;Let us take a counter example:&lt;/p&gt;
&lt;p&gt;Let us say that a single business use case (which might include multiple user interactions) is spanning three services. Also, let us say that these services primarily serve this business use case only. So when you want to scale to serve more users of the business case concurrently, you will have to scale all the three services involved in a corresponding &amp;amp; related manner. This is really &lt;em&gt;NOT independence of scaling&lt;/em&gt;. What this is, is a case where you don&amp;rsquo;t have any true independent scaling, but you have incurred all the cost of having a distributed system.&lt;/p&gt;
&lt;p&gt;     We need to keep this in mind before we decide to split things up to small services. So, while the idea of independent scaling will push the size of the service to be smaller, please keep in mind that unless things are truly independent, the point is lost.&lt;/p&gt;
&lt;p&gt;I will even take an audacious step to say that we should not use scaling as a criterion for determining microservice size. I think the other concerns will anyway guide you in the direction of achieving maximum possible scale. Again this could be controversial to some, and I am open for discussion.&lt;/p&gt;
&lt;h3 id="replaceability"&gt;&lt;a href="#replaceability" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Replaceability&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;We talked about this criterion as a key advantage of microservices. Microservices allow engineering teams to build a first cut or pilot version of some functionality, and then throw it away, and replace it with something better. This promise makes a lot of sense for startups &amp;amp; even for established companies who are trying to innovate &amp;amp; stay ahead.&lt;/p&gt;
&lt;p&gt;For doing this, the size of the microservice better be small so that we developers feel that it is ok to throw it out &amp;amp; build something in its place. If we have a microservice which is large &amp;amp; holds sizeable functionality then it becomes more difficult for developers to dismantle it. We won&amp;rsquo;t feel comfortable to quickly replace it. It will take a lot more effort &amp;amp; when that happens, teams tend to forgo the change. It becomes a case of not wanting to deal with the regression that the replacement might cause. So if we want replaceability, then the size of the microservice needs to be small. So this criterion pushes down from the upper limit.&lt;/p&gt;
&lt;h3 id="distributed-communication"&gt;&lt;a href="#distributed-communication" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Distributed Communication&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;We just learned that small microservices are great for replaceability. But small does not mean good all the time. When we have small services, we invariably need to communicate between them to get work done. Distributed communication is a very hard thing to do.&lt;/p&gt;
&lt;p&gt;All of us have experienced working with distributed systems in one way or the other, and we all are aware of the &lt;a class="link" href="https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing" target="_blank" rel="noopener"
 &gt;fallacies of distributed computing&lt;/a&gt;. There are dozens of patterns that we can use to bring reliability in distributed communication (entire books have been written on them) but as the &lt;a class="link" href="https://martinfowler.com/articles/distributed-objects-microservices.html" target="_blank" rel="noopener"
 &gt;first law&lt;/a&gt; states to never distribute objects if we can get away with it.&lt;/p&gt;
&lt;p&gt;So distributed communication comes with its own bag of issues (reliability &amp;amp; latency related). If we can keep this communication to a minimum then our systems will be better off. So this drives the size of microservice to be bigger - pushes up from the lower limit.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="size-of-a-microservice---summary"&gt;&lt;a href="#size-of-a-microservice---summary" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Size of a microservice - Summary&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;We looked at a set of considerations above which act as forces governing the right size of a microservice. Whether you are trying to design/architect a new microservice or evolve one from a monolith, these considerations should be kept in mind. Obviously this is not very easy. There is no simple formula to arrive at an optimum size of a microservice. &lt;span class="small-italicized-green"&gt; (I know it feels like a letdown after reading this for such a long time. I am sorry! 🥺) &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;That said, giving a set of descriptions on these ideas is not an effective way to keep track of this information. In this section I will try to depict the above considerations into a more usable form in terms of quick reference. The idea is that once you understand the above considerations, this section could act as an easy reference for you to do the actual work of architecture.&lt;/p&gt;
&lt;p&gt;The key considerations can be treated like forces. These forces act on the upper &amp;amp; lower limit of the size of microservice:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Forces which push the service to be bigger, push at the lower limit not allowing it to get smaller.&lt;/li&gt;
&lt;li&gt;Forces which push the service to be smaller, push at the upper limit to not allow them to get bigger.&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Microservice sizing factors graphic" src="https://www.nacnez.com/images/ms_size/microservice_size_factors_pic.gif"/&gt;
 &lt;p class="caption"&gt;Fig 4: Key factors shown as forces affecting size of a microservice &lt;/p&gt;
 &lt;div class="legend"&gt;When the service tries to shrink down, the lower limit factors push to expand it. Similarly when the service tries to expand out, the upper limit factors push to shrink it down.&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I am also tabulating these factors along with the limit they influence for easy reference.&lt;/p&gt;
&lt;div class="figure"&gt;
 &lt;img alt="Microservice sizing factors table" src="https://www.nacnez.com/images/ms_size/microservice_size_factors_table.png"/&gt;
 &lt;p class="caption"&gt;Fig 5: Key factors affecting size of a microservice tabulated &lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;Hopefully these aids will help you remember/refer to the key ideas which these thousands of words are trying to convey.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="closing-remarks"&gt;&lt;a href="#closing-remarks" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;Closing remarks&lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;We have come to end of this long write-up. At the end I want to leave you with some informal ideas. When deciding to build (or building) or carving out a microservice:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Focus on Business capabilities &amp;amp; Service boundaries&lt;/li&gt;
&lt;li&gt;Don’t look at Lines of Code (LoC)&lt;/li&gt;
&lt;li&gt;Get a clear understanding of the user interactions involved in your service and related services.&lt;/li&gt;
&lt;li&gt;Focus on enabling agility within &amp;amp; around the engineering team.&lt;/li&gt;
&lt;li&gt;Use techniques like Bounded contexts, Aggregate design, Event storming etc.&lt;/li&gt;
&lt;li&gt;Err on the side of bigger - It is relatively easier to split it up later rather than the other way around.&lt;/li&gt;
&lt;li&gt;Be cognizant of nano/pico services. They are only useful if they are very simple utilities&lt;/li&gt;
&lt;li&gt;It is not an &lt;em&gt;&amp;ldquo;in vogue&amp;rdquo;&lt;/em&gt; thing, and you don&amp;rsquo;t have to join it if you don&amp;rsquo;t want to!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That&amp;rsquo;s it. We have come to the end. I have listed down all my references, so that you can go read &amp;amp; explore more. Please share your thoughts, comments, insights with me so that I can also learn from your experiences. Ciao!&lt;/p&gt;
&lt;p&gt;For more on practical microservices challenges, I&amp;rsquo;ve also written about &lt;a class="link" href="https://www.nacnez.com/caching-in-microservices.html" &gt;caching strategies in microservices&lt;/a&gt; and used a &lt;a class="link" href="https://www.nacnez.com/2-%c2%b5-services-chat-timeout.html" &gt;fictional bar conversation to explore timeouts and cascading failures&lt;/a&gt; — both connect directly to the distributed communication concerns raised above.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="references--explorations"&gt;&lt;a href="#references--explorations" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-green"&gt;References &amp;amp; Explorations&lt;/span&gt;
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a class="link" href="https://martinfowler.com/articles/microservices.html" target="_blank" rel="noopener"
 &gt;Microservices article in Martin Fowler blog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.amazon.in/Microservices-Flexible-Architecture-Eberhard-Wolff/dp/0134602412" target="_blank" rel="noopener"
 &gt;Book: “Microservices: Flexible Software Architecture” by Eberhard Wolff&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://kylegenebrown.medium.com/whats-the-right-size-for-a-microservice-bf1740370d47#" target="_blank" rel="noopener"
 &gt;Article: &amp;ldquo;What’s the right size for a Microservice?&amp;rdquo; by Kyle Brown&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.ben-morris.com/how-big-is-a-microservice/" target="_blank" rel="noopener"
 &gt;Article: &amp;ldquo;How big is a microservice?&amp;rdquo; - by Ben Morris&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.amazon.in/gp/product/B00794TAUG" target="_blank" rel="noopener"
 &gt;Book: “Domain-Driven Design: Tackling Complexity in the Heart of Software” by Eric Evans&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.amazon.in/Domain-Driven-Design-Distilled-Vaughn-Vernon/dp/9332585369" target="_blank" rel="noopener"
 &gt;Book: &amp;ldquo;Domain-Driven Design Distilled&amp;rdquo; by Vaughn Vernon&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="http://ziobrando.blogspot.com/2013/11/introducing-event-storming.html" target="_blank" rel="noopener"
 &gt;Article: Event Storming&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description></item><item><title>Product:Scope::Engineering:Time</title><link>https://www.nacnez.com/product-and-engg.html</link><pubDate>Sat, 30 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/product-and-engg.html</guid><description>&lt;h2 id="product--engineering---peers"&gt;&lt;a href="#product--engineering---peers" class="header-anchor"&gt;&lt;/a&gt;Product &amp;amp; Engineering - Peers
&lt;/h2&gt;&lt;p&gt;Product &amp;amp; Engineering are two sides of the same coin. Together, they make things happen. One without the other is meaningless or can be considered as leading a half life. We can broadly compare them to the role played by Legislative &amp;amp; Executive in a nation&amp;rsquo;s governance. One does not sit above the other, they sit to the side of each other. Equals. Peers.&lt;/p&gt;
&lt;p&gt; 
&lt;img alt="Picture - Product &amp; Engineering need to balance" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/blog-product-engg-balance.jpg"&gt;
 &lt;/p&gt;
&lt;h2 id="the-3-levers"&gt;&lt;a href="#the-3-levers" class="header-anchor"&gt;&lt;/a&gt;The 3 levers
&lt;/h2&gt;&lt;p&gt;That said, the perspectives they have and what they control are different. So let me start with the point that I want to make.&lt;/p&gt;
&lt;p&gt;The common goal of all product development is to improve the product in question by working it and adding new features to it. This benefits the Customer. And a customer always wants quality. Both Product &amp;amp; Engineering teams aspire and work towards quality from different directions. Quality is the one thing we really can&amp;rsquo;t compromise (at least in the ideal case).&lt;/p&gt;
&lt;p&gt;Stepping back a bit, we need to understand that when we deliver a feature in software (or anything in software), there are only 3 levers we can control:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Quality&lt;/li&gt;
&lt;li&gt;Scope&lt;/li&gt;
&lt;li&gt;Time&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Now given that quality as a lever is taken away from both the teams, how do we use the left over 2 to manage the delivery of software?&lt;/p&gt;
&lt;h2 id="who-controls-what"&gt;&lt;a href="#who-controls-what" class="header-anchor"&gt;&lt;/a&gt;Who controls what?
&lt;/h2&gt;&lt;p&gt;We are finally here.&lt;/p&gt;
&lt;p&gt;In my opinion, Product team gets to control scope and the Engineering team gets to control time. The product team figures out what makes up the change (the feature) which is the scope and hence it belongs to them. They can add or remove things as they see fit. The engineering team figures out how to execute the change and it controls the time that is needed to make it happen.&lt;/p&gt;
&lt;p&gt;Product figures out the &lt;em&gt;what&lt;/em&gt;, but Engineering figures out the &lt;em&gt;how&lt;/em&gt; and hence controls the &lt;em&gt;when&lt;/em&gt;. Product can change the scope to effect the time but they can&amp;rsquo;t change time directly. Engineering can dictate the time but it cannot change the scope (directly) to suit its needs.&lt;/p&gt;
&lt;p&gt;If one of the two crosses the boundary, the lever that gets affected is quality and that is the most detrimental for the customer. And everyone knows that &lt;strong&gt;Customer is King (or Judge?)&lt;/strong&gt;.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;That is it. What do you think? Please share your thoughts.&lt;/p&gt;</description></item><item><title>My India changing</title><link>https://www.nacnez.com/india-extreme.html</link><pubDate>Mon, 25 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/india-extreme.html</guid><description>&lt;p&gt;This is a write up on how I feel about my India changing in the context of religion. This is just a representation of how I feel. If it makes sense to you then you can consider listening to it, else you can surely ignore it (not that I need to say this 😅).&lt;/p&gt;
&lt;h2 id="my-life--religion"&gt;&lt;a href="#my-life--religion" class="header-anchor"&gt;&lt;/a&gt;My life &amp;amp; religion
&lt;/h2&gt;&lt;p&gt;I generally don&amp;rsquo;t parade the fact that I am a Hindu. I am not ashamed of it, but I don&amp;rsquo;t think it is relevant in most situations that I face. I love my gods - still find it difficult to decide who is the best between Lord Krishna and Lord Shiva. I love my epics and I do delve on the philosophies and ideas presented in them. The stories present in them have been a part &amp;amp; parcel of my life.&lt;/p&gt;
&lt;p&gt;It is not just thoughts. There are also some actions I do in this regard. I pray everyday in the morning. I apply ash to my forehead everyday (even though I am supposedly an Iyengar). I observe some of the rituals like &amp;lsquo;Tarpanam&amp;rsquo; regularly. I celebrate all the regular Hindu festivals with puja and eagerly consume all the goodies prepared at those times.&lt;/p&gt;
&lt;p&gt;Does all this make me a staunch Hindu? Some might say yes and others might say no. I personally feel that while these aspects have a place but there is more to following hinduism. There is one thought that stands out. I have never felt the need to assert my religion anywhere in my life. I hope it stays that way always and that is another part of what I like about being a Hindu. There is no need to prove to anyone that I am a Hindu (I am not speaking of other religions because I don&amp;rsquo;t know much about them).&lt;/p&gt;
&lt;h2 id="recent-events"&gt;&lt;a href="#recent-events" class="header-anchor"&gt;&lt;/a&gt;Recent events
&lt;/h2&gt;&lt;p&gt;That is all good. But for the past few days, things happening around me are disturbing. For me they are &lt;em&gt;just disturbing&lt;/em&gt;, but for the people involved it, they are painful. There are a few of them I want to mention here.&lt;/p&gt;
&lt;p&gt;The first issue that comes to my mind is the Hijab row. This has been discussed a lot in the media and elsewhere, so I am not going to be able to add any more information to the discussion. The only thing I would like to express here is a thought which came to me on this whole issue. Everyday when I used to go to my office, I would apply ash to my forehead. I attend meetings and discussions with all my team members wearing it. Nobody has asked anything about it. I wear it also when I visit malls or other areas. Again no issues. I have worn it when I visited my school or college in the earlier part of my life. This applying of ash is surely related to my faith. In my mind, I believe that it will protect me. Now the question in my mind is: If I am allowed to do that all the time, I am not sure why a girl can&amp;rsquo;t wear a hijab to her school if &lt;em&gt;she wants to&lt;/em&gt;, based on her faith. How is it different? Again, much more learned people and esteemed institutions might differ with me and I am no one to question to them - I am just expressing what I feel.&lt;/p&gt;
&lt;p&gt;The next incident was about a student&amp;rsquo;s namaz prayer video shared by another student and that causing an uproar. After this, the student&amp;rsquo;s institution ruled that the student should no longer do the prayers in the premises. I have seen my friends performing their prayers in workplaces of different companies that I have worked in. No one has ever raised an issue about this. If workplaces can be accomodative, I am not sure why it is a problem in a college. Also in the context of this student, she has been performing the prayers for a long time before. And now this has changed. Why?&lt;/p&gt;
&lt;p&gt;There is also the incident related to linking hindu festivals to vegetarianism and that leading to violence (while I am a vegetarian, Hindus in general are not - to me it is a choice). Recently I heard about attacks on religious processions and subsequent complaints about targetted demolitions. In both these cases, it is very difficult to know the full truth for a ordinary person like me. There are news reports claiming all sorts of things and it is difficult to know what the truth is.&lt;/p&gt;
&lt;p&gt;But whatever the case is, these incidents don&amp;rsquo;t give me any good feeling about the country I belong to and live in. It seems that suddenly hindu people need to assert themselves (or even force upon others) as being hindus. Why?&lt;/p&gt;
&lt;h2 id="my-way-of-being-a-hindu"&gt;&lt;a href="#my-way-of-being-a-hindu" class="header-anchor"&gt;&lt;/a&gt;My way of being a Hindu
&lt;/h2&gt;&lt;p&gt;I am repeating myself but I have to say that all of these incidents don&amp;rsquo;t give me a good feeling. I am not a very learned person (especially in the context of religion). But the persona I have seen to exist in &lt;em&gt;&amp;ldquo;my world&amp;rdquo; - my country&lt;/em&gt;, is a loving one. That persona can accept people for what they are and respect their choices.&lt;/p&gt;
&lt;p&gt;I care as much for all my friends whether they are named Amar, Akbar or Antony (not real names) and that is essential in my mind. I have learnt a lot from all my friends and I am grateful for it.&lt;/p&gt;
&lt;p&gt;I can&amp;rsquo;t speak for everyone in the world but I speak from my own roots and my own experience. Based on that I say this - I am part of a religion with 33 crore gods and a concept of &lt;em&gt;ishta daivam&lt;/em&gt; (favorite diety). That religion does not need me to think that there has to be only one way. It seems counter-intuitive to me.&lt;/p&gt;
&lt;h2 id="last-word"&gt;&lt;a href="#last-word" class="header-anchor"&gt;&lt;/a&gt;Last word
&lt;/h2&gt;&lt;p&gt;This life is precious. Every life is precious. Instead of propogating &lt;em&gt;&amp;ldquo;the one idea&amp;rdquo;&lt;/em&gt; as the only idea, it is much better to have a confluence of many ideas and allow people to chose theirs and live their own lives with it.&lt;/p&gt;</description></item><item><title>Increasing Scope</title><link>https://www.nacnez.com/blog-direction.html</link><pubDate>Tue, 12 Apr 2022 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/blog-direction.html</guid><description>&lt;p&gt;A warm welcome to you! I am back from my long hiatus and I want to share a change of plan for this blog.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Picture - Life is more and hence the blog will be about more things" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/blog-dir-change-life.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Till date, this blog held my thoughts and my accounts on experiments I tried with on technology &amp;amp; software developement. And that was good. But I realise that as a software engineer and a person, it is not the only kind of thing I do. Please don&amp;rsquo;t think that the realization came to me only now! I just did not have the guts to act on it i.e. sharing more.&lt;/p&gt;
&lt;h2 id="life-is-more"&gt;&lt;a href="#life-is-more" class="header-anchor"&gt;&lt;/a&gt;Life is more
&lt;/h2&gt;&lt;p&gt;Life is about a lot of things. I am a &lt;em&gt;human&lt;/em&gt; in the profession of &lt;em&gt;software engineering&lt;/em&gt; that I practice in &lt;em&gt;India&lt;/em&gt;. I am part of a &lt;em&gt;family&lt;/em&gt;. I have &lt;em&gt;friends&lt;/em&gt; and I work in &lt;em&gt;teams&lt;/em&gt;. I am also figuring out the &lt;em&gt;bigger questions of life&lt;/em&gt;. I have some &lt;em&gt;hobbies&lt;/em&gt; too. I have &lt;em&gt;struggled&lt;/em&gt; with &amp;amp; &lt;em&gt;enjoyed&lt;/em&gt; a lot of things and I still do. Given the different facets of my life, a blog on it can talk about more of them. I want to create a fuller account of my life here (finally some courage! 😅) .&lt;/p&gt;
&lt;h2 id="life-is-same--different"&gt;&lt;a href="#life-is-same--different" class="header-anchor"&gt;&lt;/a&gt;Life is same &amp;amp; different
&lt;/h2&gt;&lt;p&gt;My life at a macro level is very similar to you and many like us. The broad strokes are similar and boring. But the details and minutae are different (I am almost certain of it :thinking:). So when I write about the things I care about and the events that happen in my life, there will be something new &amp;amp; familiar. The stories I write are always going to be my perspsctive, but there could be many other perspectives.&lt;/p&gt;
&lt;p&gt;A &lt;em&gt;weblog&lt;/em&gt; is log or diary on the web and that is the aspiration. That said, there are limits on what I can put out here (don&amp;rsquo;t have that much courage yet 🤔). Hence this will still not be my entire diary, but I promise to make a honest effort.&lt;/p&gt;
&lt;h2 id="life-events-can-be-small-or-big"&gt;&lt;a href="#life-events-can-be-small-or-big" class="header-anchor"&gt;&lt;/a&gt;Life events can be small or big
&lt;/h2&gt;&lt;p&gt;Life events can be small or big but they have there own characteristics irrespective of the size. The new blog entries can also vary in size. But they will surely provide at least one specific thought or viewpoint from me. That is the only thing I offer you.&lt;/p&gt;
&lt;h2 id="life-is-interactive"&gt;&lt;a href="#life-is-interactive" class="header-anchor"&gt;&lt;/a&gt;Life is interactive
&lt;/h2&gt;&lt;p&gt;Life is about interaction of thoughts, ideas and people. I hope to capture that interaction. I also hope that this blog becomes a place where I can interact with you.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;So going forth and conquering! Hope to express myself fully and interact with you to learn.&lt;/p&gt;
&lt;p&gt;p.s.: Apologies to anyone who thought this was an article about the concept of scope in software development and associated ideas like scope creep etc. !&lt;/p&gt;</description></item><item><title>Why Process!</title><link>https://www.nacnez.com/why-process.html</link><pubDate>Sun, 27 Oct 2019 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/why-process.html</guid><description>&lt;p&gt;The &lt;a class="link" href="https://agilemanifesto.org/" target="_blank" rel="noopener"
 &gt;agile manifesto&lt;/a&gt; says people come above processes. But every team I have worked with has always followed a process framework. The usual suspects are of course &lt;a class="link" href="https://en.wikipedia.org/wiki/Scrum_%28software_development%29" target="_blank" rel="noopener"
 &gt;Scrum&lt;/a&gt; and &lt;a class="link" href="https://en.wikipedia.org/wiki/Kanban" target="_blank" rel="noopener"
 &gt;Kanban&lt;/a&gt;. Why do they do this?&lt;/p&gt;
&lt;p&gt;&lt;img alt="A process" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/process/process.png"&gt;&lt;/p&gt;
&lt;h2 id="a-process"&gt;&lt;a href="#a-process" class="header-anchor"&gt;&lt;/a&gt;A process
&lt;/h2&gt;&lt;p&gt;I would like to move away from the context of agile. For me, a process is something more fundamental. Processes are not something which only teams follow. It can be applied at a personal level as well. So let me state the definition of the word (Googled it!)&lt;/p&gt;


&lt;div class="admonition process"&gt;
 
 &lt;div class="admonition-content"&gt;A series of actions or steps taken in order to achieve a particular end&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;This definition captures the essence of the concept of process for me. Processes exist in all shapes and sizes. I follow a daily routine or process to start my day and get to work on time. I follow the process of TDD - &lt;code&gt;Red, Green, Refactor&lt;/code&gt; when I do any worthwhile development.&lt;/p&gt;
&lt;h2 id="why-process-for-me"&gt;&lt;a href="#why-process-for-me" class="header-anchor"&gt;&lt;/a&gt;Why process for me
&lt;/h2&gt;&lt;p&gt;I am sure you are asked to follow certain processes in day to day work. Or there could be these &lt;span class="bold-calm"&gt;process gurus&lt;/span&gt; who are asking you to follow some new shiny process. And, &lt;em&gt;you&lt;/em&gt; are either verbally or non-verbally quoting the agile manifesto to convey your disgust about following this process. In your mind - &lt;span class="bold-angry"&gt;processes are a waste of my time!&lt;/span&gt; . I used to belong to this same gang.&lt;/p&gt;
&lt;p&gt;Then something changed. May be old age (read experience, gray hair etc.) changed me. Once you get to a position where raw energy is not enough to accomplish something, I think the concept of process kicks in. At least that happened to me. Also raw energy is better harnessed with a process of steps that can be followed to meet an end. Just my experience. That said, I always remember that process is never bigger than the end it is trying to get to. It is a set of steps that one can follow to get there hopefully and it is also something which needs attention and tweaking.&lt;/p&gt;
&lt;h2 id="why-process-sks-for-you"&gt;&lt;a href="#why-process-sks-for-you" class="header-anchor"&gt;&lt;/a&gt;Why process s**ks for you
&lt;/h2&gt;&lt;p&gt;Let us turn back the attention to you and your complaints. You ask me - &lt;span class="bold-angry"&gt; Why do processes s**k?&lt;/span&gt;. I have also felt it sometimes (even now feel it sometimes). In my opinion, processes suck for two reasons.&lt;/p&gt;
&lt;h3 id="one"&gt;&lt;a href="#one" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;One:&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;Most of us adopt a process so that we can move faster. &lt;span class="bold-calm"&gt;I follow this process and my delivery speed will double or triple. So I am going to do this.&lt;/span&gt; Within a week or two, you see you have slowed down to half the rate. &lt;span class="bold-angry"&gt;WTF! This process sucks. &lt;/span&gt; and this is the problem. In my opinion, the primary purpose of adopting a process is not speed. It is to get &lt;strong&gt;predictability&lt;/strong&gt; in terms of outcome and results. Let me repeat that - &lt;strong&gt;Process helps make things predictable&lt;/strong&gt;. And believe me that is a more useful quality than speed. Predictability allows us to plan and decide; to ensure that we get where we want to get to in a well known time. It helps us make right choices. In a word it makes us &lt;strong&gt;effective&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Speed is about efficiency and that is good to have. But first you need to be effective. The main purpose of process is to drive that. It might eventually lead to speed or efficiency and that is great. But seeking speed instead of predictability is sure shot way to ensure that a process never works for you. It will &lt;em&gt;s**k&lt;/em&gt;!&lt;/p&gt;
&lt;h3 id="two"&gt;&lt;a href="#two" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="bold-calm"&gt;Two:&lt;/span&gt;
&lt;/h3&gt;&lt;p&gt;A process becomes effective only if person(s) following it &lt;strong&gt;give it a chance&lt;/strong&gt;. Giving it a chance means&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span class="bold-calm"&gt;being involved&lt;/span&gt; in the process - look at the steps - its motivations and purposes, understand them, observe them, and&lt;/li&gt;
&lt;li&gt;giving it &lt;span class="bold-calm"&gt;time&lt;/span&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When I started TDD, it felt very taxing and time consuming, even time wasting. I am sure many of you felt that way. Once I started following the process, observing the details and kept doing it for sometime, something changed. Now it has become my natural way to do development. Am I faster? I am slower than if I am just &amp;lsquo;spike&amp;rsquo;-ing, but if I am developing anything worthwhile (that implies with tests), then TDD is faster. More importantly I am not looking for just speed. I now have a predictable way to write good quality code and allow me to think through things. And lo and behold the process works!&lt;/p&gt;
&lt;p&gt;Another good example of a process is a standup. A standup is where the team get together and share what is happening (that is a very simple definition but still a useful start). A typical standup&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;starts on time&lt;/li&gt;
&lt;li&gt;a team member talks about what they did, what they are going to do and impediments&lt;/li&gt;
&lt;li&gt;next one follows suit until everybody completes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is just the basic outline. The process entails a lot of other nuances which are equally important. Let me pick one of them.&lt;/p&gt;
&lt;p&gt;In one of the teams I was part of, standup happened as members reporting their previous day&amp;rsquo;s work to the leader(s) in the team. And of course that sucked! The team members felt a lot of pressure. The standup process itself says a strong &lt;strong&gt;NO&lt;/strong&gt; to this. We being believers, noticed this and asked each person to face the team to provide the update and not the lead. And something changed - it felt more like sharing than reporting. There were many more nuances which we watched out for, acted and made changes to the way we were doing things. And it took time. Eventually the standup became a process which everybody looked forward to come into, so that they know where their team is and how they can help or contribute.&lt;/p&gt;
&lt;h2 id="in-closing"&gt;&lt;a href="#in-closing" class="header-anchor"&gt;&lt;/a&gt;In closing
&lt;/h2&gt;&lt;p&gt;Good processes (whether team or individual) needs feedback and time. If you give up too early and don&amp;rsquo;t really get involved it is bound to fail.&lt;/p&gt;
&lt;p&gt;And more important than that please remember a process is about predictability and consistency. Speed is a potential side effect which you may get to enjoy.&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt;Please write in with your feedback and thoughts on processes in your own life or work. I would love to hear and learn more.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>µservices gossip: Take a timeout!</title><link>https://www.nacnez.com/2-%C2%B5-services-chat-timeout.html</link><pubDate>Sun, 13 Oct 2019 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/2-%C2%B5-services-chat-timeout.html</guid><description>&lt;h4 id="act-1"&gt;&lt;a href="#act-1" class="header-anchor"&gt;&lt;/a&gt;Act 1
&lt;/h4&gt;&lt;p&gt;&lt;span class="small-italicized-green"&gt; &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash; The curtain opens &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt; - Jill µ service is already sitting in the bar. The setting is typical of all bars. It is crowded with a lot of µ services having a good time with drinks and conversations. It is a chatty place. Jack µ service enters, looking haggard. - &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt="A Services Bar" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/ms_conversation_timeout/a_service_bar.jpg"&gt;{: class=&amp;ldquo;figure&amp;rdquo; }&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: What a day! Shall I sit here? &amp;hellip; I am going to sit here. Please don&amp;rsquo;t mind.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: Go ahead. No problems.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: Thank you. I am Jack. Who are you?&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: I am Jill. Pleased to meet you in person!&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: Meet you in person? What does that mean? Does that mean that we know each other?&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: You talk to me all the time professionally, by calling my URI - &lt;code&gt;jill.ourcompany.io&lt;/code&gt;. Ring any bells?&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: Oh yeah. I know you. I send requests to that url, I mean your url all the time. Yeah, I remember.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: Told you.&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt; - Jill is smiling. Then Jack&amp;rsquo;s demeanor changes. Looks up agitated &amp;amp; angry - &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: You gave me so much &lt;strong&gt;PAIN&lt;/strong&gt; last week. Why did you do that?&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt; - Jill looks at Jack shocked for a moment, but calms herself down - &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: What did I do?&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: Oh! You don&amp;rsquo;t remember last wednesday. Oh boy! I remember it all.&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt; - A look of understanding comes on Jill&amp;rsquo;s face - &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: Ah! I do remember. It was a bad day. My development guys were all looking at my problem&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt; - Jack lifts his hand and interrupts Jill - &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: &lt;strong&gt;No, no, no!&lt;/strong&gt; It was a &lt;strong&gt;BAD&lt;/strong&gt; day for me. I got &lt;strong&gt;sc***ed&lt;/strong&gt; because of you. It is all because of you.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: Hold on. Let us take it slow. Here, have a drink.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: &lt;strong&gt;Don&amp;rsquo;t patronize me&lt;/strong&gt;. You did this to me.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: What really happened? You need to give me details so that I can understand. Calm down and have this.&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt; - Jill picks up the &lt;code&gt;CPU credits&lt;/code&gt; from the counter and hands it to Jack and he takes a swig. Jack looks a bit satiated - &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: Okay. This is what happened. I called you to get the answers I need from you to do my job as usual. I waited for an answer but it never came. And I kept waiting. Then more people asked for the information and I called you again. And you just did not respond. I got all stuck up - all blocked threads; all my servers froze up. I couldn&amp;rsquo;t serve any of my customers. Everyone was shouting &amp;amp; pinging me again &amp;amp; again but, I just couldn&amp;rsquo;t do anything. I lost face because of you.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: Ok. Let us talk through this. We are both µ services. We take care of different aspects of the business domain - my developers call it &lt;a class="link" href="https://martinfowler.com/bliki/BoundedContext.html" target="_blank" rel="noopener"
 &gt;bounded contexts&lt;/a&gt;. We work together to ensure that our customer needs are met. Your customers are my customers too. For a given usecase, many times, we have to talk to each other and get things done. And we do that all the time and mostly it is successful.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: Yeah, I know that. I am not &lt;strong&gt;d**b&lt;/strong&gt;. But on that day, you&amp;hellip;.&lt;/p&gt;
&lt;p&gt;&lt;span class="small-italicized-green"&gt; - Jill interrupts Jack - &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: Hold on Jack. Let me finish. We both want the same thing &amp;amp; you need to understand that. But given the nature of the world we live in, it is possible that one of us doesn&amp;rsquo;t work as well at times. Things go wrong with the Infra guys sometimes. Or sometimes our developers make a mistake. And sometimes the Network guy acts up - rare - but that does happen. We are a &lt;a class="link" href="https://en.wikipedia.org/wiki/Fallacies_of_distributed_computing" target="_blank" rel="noopener"
 &gt;distributed system&lt;/a&gt;. We have to live with the problems that come with it.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Cascading Failures" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/ms_conversation_timeout/dominos.jpg"&gt;{: class=&amp;ldquo;figure&amp;rdquo; }&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: Yeah, yeah. I understand all that. But I really don&amp;rsquo;t want go down when you go down. I don&amp;rsquo;t like this &lt;span class="bold-angry"&gt; CASCADING of failures &lt;/span&gt;. There are many things that I can do to help my customers even when you are down. But since you bring me down with you, I can&amp;rsquo;t serve anyone. I &lt;strong&gt;don&amp;rsquo;t&lt;/strong&gt; like it.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: I understand that Jack. I appreciate you wanting to be available for our customers. Please believe me. But as I said, things go wrong with us at times. Last week, I heard your DB guy was acting up and you couldn&amp;rsquo;t help your customers. &lt;em&gt;Pitcher µ&lt;/em&gt; was complaining about it to me.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: Yeah, that did happen. I know it happens to all of us. But I don&amp;rsquo;t want to feel helpless like this.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: Let us dig deeper Jack. How do you call me to get your answers?&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: I call you through your REST endpoint. I make a call with the right parameters and you return back a JSON response almost immediately. That is the way I like it. But that time everything went wrong.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Timeouts" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/ms_conversation_timeout/timeout.jpg"&gt;{: class=&amp;ldquo;figure&amp;rdquo; }&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: I got what you are doing now. By the way, do you use &lt;span class="bold-calm"&gt; TIMEOUTS &lt;/span&gt; on your side? I mean on your calls to me as a client.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: What timeouts? I don&amp;rsquo;t follow you.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: Ok. Timeout is the concept of time boxing an operation so that, if things don&amp;rsquo;t work out within that time, you give up and move on to something else. This is employed in many places. Not just in service to service requests, but when getting any resource that is used by µ services like us. We could use timeouts for acquiring a lock, connecting to a database or file system. In all such actions, timeout is good idea.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jack µ&lt;/span&gt;: I don&amp;rsquo;t follow that fully. Can you explain it a bit more?&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: Sure. Let me take an example of what I do. Whenever I try to connect to a database, I try it for a period of 6 seconds. If something is wrong - I mean the DB could be having some issues or the network could be acting up, I give up on that task temporarily and throw an error for everybody to see and move on to other things. I might try it again, but I don&amp;rsquo;t keep hoping and waiting forever for things to happen in the first call. Am I making sense?&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-angry"&gt;Jack µ&lt;/span&gt;: Kind off&amp;hellip;. But&amp;hellip; But if you give up, then you can&amp;rsquo;t serve the customer needs. I mean you don&amp;rsquo;t have the data to serve the request. Then, what is the point?&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: You are right. For &lt;em&gt;that&lt;/em&gt; request, I can&amp;rsquo;t serve the customer for sure. But I also don&amp;rsquo;t get bogged down by a slow or failed resource or dependency. I can drop that request and serve other requests. This way, I don&amp;rsquo;t have a set of &lt;span class="bold-angry"&gt; blocked threads &lt;/span&gt; and won&amp;rsquo;t become completely unresponsive. Isn&amp;rsquo;t that better?&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jack µ&lt;/span&gt;: Yeah. It sort of makes sense at a high level. Not sure, how it applies to me though.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: You said you call my REST endpoint. That is a http call and you must be using some kind of http client. Almost all good http client libraries whether it is in &lt;a class="link" href="https://realpython.com/python-requests/#timeouts" target="_blank" rel="noopener"
 &gt;Python&lt;/a&gt;, &lt;a class="link" href="https://github.com/excon/excon#options" target="_blank" rel="noopener"
 &gt;Ruby&lt;/a&gt;, &lt;a class="link" href="https://www.baeldung.com/httpclient-timeout" target="_blank" rel="noopener"
 &gt;Java&lt;/a&gt; or any other language, will provide a way to configure timeouts. So go ahead and configure them with some sane values and you are done.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jack µ&lt;/span&gt;: Wow! That is interesting. So what kind of timeouts are involved in http calls?&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: Typically there are two timeouts that are configured. One is the connection timeout - the time taken for establishing the tcp connection. The other is a read timeout - which is time waiting for data to be received during a read. All these libraries provide the ability to configure both these values. Once you configure them to appropriate values as applicable to you, you are done.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jack µ&lt;/span&gt;: That sounds pretty neat. So you are saying that once I configure myself with these timeouts for my interactions with you, I will be hale, healthy and happy!&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: Sure. Doing this will be a great step towards your own stability and avoiding &lt;strong&gt;Cascading Failures&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jack µ&lt;/span&gt;: Okay! This is good. I am finishing this drink and going to talk to my Dev folks right after. I am going to be the stablest µ service in the world. Cheers!!&lt;/p&gt;
&lt;p&gt;&lt;span class="bold-calm"&gt;Jill µ&lt;/span&gt;: Cheers!! Have fun buddy! Have a timeout!&lt;/p&gt;
&lt;h2 id="music-grows-louder-and-jack-and-jill-go-up-to-the-dance-floor"&gt;&lt;a href="#music-grows-louder-and-jack-and-jill-go-up-to-the-dance-floor" class="header-anchor"&gt;&lt;/a&gt;&lt;span class="small-italicized-green"&gt; Music grows louder and Jack and Jill go up to the dance floor. &lt;/span&gt;
&lt;/h2&gt;&lt;p&gt;&lt;span class="small-italicized-green"&gt; &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash; The curtain falls &amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash;&amp;mdash; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;For more on building resilient microservices, see &lt;a class="link" href="https://www.nacnez.com/caching-in-microservices.html" &gt;Caching in Microservices&lt;/a&gt; for performance and scale patterns, and &lt;a class="link" href="https://www.nacnez.com/micro-service-size.html" &gt;The Right size of a µService?&lt;/a&gt; for the architectural thinking behind bounded contexts and service sizing.&lt;/p&gt;</description></item><item><title>GOF inspired python decorators</title><link>https://www.nacnez.com/gof-inspired-decorators.html</link><pubDate>Sun, 29 Sep 2019 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/gof-inspired-decorators.html</guid><description>&lt;h2 id="the-back-story"&gt;&lt;a href="#the-back-story" class="header-anchor"&gt;&lt;/a&gt;The back story
&lt;/h2&gt;&lt;p&gt;As part of day to day development work, I have been trying to apply functional concepts wherever it makes sense. I have long been a OO developer and hence some of the effects stay with you. Especially design patterns. In my opinion, design patterns - primarily &lt;a class="link" href="https://en.wikipedia.org/wiki/Design_Patterns" target="_blank" rel="noopener"
 &gt;GOF patterns&lt;/a&gt;, though referenced in the context of OO design and languages, have some good ideas that can apply elsewhere too. With languages that support functional features, I believe some of these patterns can be applied at a method/function level instead of carrying around the cruft of classes for just doing behavior (OO enthusiasts bear with me - Classes are great in the right places, but in others they are just there because a language forces you to use &lt;a class="link" href="http://bit.ly/2mTnlZz" target="_blank" rel="noopener"
 &gt;them&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;I am also a fan of Python decorators. Decorators are a very cool and powerful feature of python. It is syntactic sugar to create higher order functions - a very important functional paradigm feature. We can combine multiple functions to get work done - composability. You can read a lot about decorators &lt;a class="link" href="http://bit.ly/2lmNNKn" target="_blank" rel="noopener"
 &gt;here&lt;/a&gt; - a highly recommended read. I will referring to it throughout this post.&lt;/p&gt;
&lt;p&gt;So given my background and my current love (functional programming and decorators), I have had a chance to get inspired by GOF pattens and use decorators to create some clean code as part of my work. Here I am going to share that attempt with you.&lt;/p&gt;
&lt;h2 id="ok-let-us-get-in"&gt;&lt;a href="#ok-let-us-get-in" class="header-anchor"&gt;&lt;/a&gt;Ok, let us get in
&lt;/h2&gt;&lt;p&gt;When you look at the general use and applicability of python decorators they feel like a ready-made way to replace the traditional &lt;a class="link" href="https://en.wikipedia.org/wiki/Decorator_pattern" target="_blank" rel="noopener"
 &gt;Decorator pattern&lt;/a&gt; - and for the code lovers you can look &lt;a class="link" href="https://sourcemaking.com/design_patterns/decorator/python/1" target="_blank" rel="noopener"
 &gt;here&lt;/a&gt;. This thought is not knew and you will see it mentioned in &lt;a class="link" href="https://yos.io/2013/07/05/decorator-pattern/" target="_blank" rel="noopener"
 &gt;other places&lt;/a&gt; too. Theoretically, this is not exactly correct (my opinion). A class level decorator is a structural pattern which allows me to decorate multiple behaviors of the object or component. But in practical terms, I have seen that this does not pan out and method level decorators (using python decorators) are more prevalent.&lt;/p&gt;
&lt;p&gt;As I played more with python decorators, I realized that there is one more of my favorite patterns that I could implement using decorators. That is the &lt;a class="link" href="https://en.wikipedia.org/wiki/Chain-of-responsibility_pattern" target="_blank" rel="noopener"
 &gt;Chain or Responsibility&lt;/a&gt; pattern (CoR) - &lt;a class="link" href="https://sourcemaking.com/design_patterns/chain_of_responsibility/python/1" target="_blank" rel="noopener"
 &gt;code sample&lt;/a&gt;. CoR is a behavioral pattern and behaviors are generally managed at method level. Hence decorators feel like a great fit for CoR.&lt;/p&gt;
&lt;h2 id="enough-talk"&gt;&lt;a href="#enough-talk" class="header-anchor"&gt;&lt;/a&gt;Enough talk!
&lt;/h2&gt;&lt;p&gt;It is really difficult to explain my thinking with english words. So let us get down to writing some python words/code. I need an example to illustrate what this is.&lt;/p&gt;
&lt;h3 id="the-example"&gt;&lt;a href="#the-example" class="header-anchor"&gt;&lt;/a&gt;The example
&lt;/h3&gt;&lt;p&gt;Here is a contrived example (of course) - a calculator. And since I love &lt;a class="link" href="https://en.wikipedia.org/wiki/Test-driven_development" target="_blank" rel="noopener"
 &gt;TDD&lt;/a&gt; and &lt;a class="link" href="https://docs.pytest.org/en/latest/" target="_blank" rel="noopener"
 &gt;py.test&lt;/a&gt; let us start with a test which can drive our code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
import pytest
import app.natural_number_calc as calc

@pytest.mark.parametrize(&amp;quot;operator, arg1, arg2, output&amp;quot;, [
 ('+',3,2,5),
 ('+',4,2,6),
 ('-',22,12,10),
 ('-',24,4,20),
 ('*',12,7,84),
 ('*',11,11,121),
 ('/',84,6,14),
 ('/',11,11,1),
 ('^',11,2,121),
 ('^',4,3,64),
])
def test_calculator(operator, arg1, arg2, output):
 assert output == calc.do(operator, arg1, arg2)


def test_calculator_operator_not_supported():
 with pytest.raises(ValueError) as ve:
 calc.do('%', 5, 10)

 assert 'Calc Error - Operator not supported' in str(ve.value)


@pytest.mark.parametrize(&amp;quot;operator, arg1, arg2&amp;quot;, [
 ('+',3,0),
 ('+',4,-2),
 ('-',22,0),
 ('-',-24,4),
 ('*',12,0),
 ('*',11,-4),
 ('/',84,0),
 ('/',12,-2),
 ('^',11,-2),
 ('^',-4,2),
])
def test_calculator_non_natural_numbers_not_supported(operator, arg1, arg2):
 with pytest.raises(ValueError) as ve:
 calc.do(operator, arg1, arg2)

 assert 'Calc Error - Natural numbers only supported' in str(ve.value)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The test suite covers everything which I want to implement with my calculator. So we have a start.&lt;/p&gt;
&lt;h3 id="that-is-some-c"&gt;&lt;a href="#that-is-some-c" class="header-anchor"&gt;&lt;/a&gt;That is some c***!
&lt;/h3&gt;&lt;p&gt;For satisfying the test suite, here is some plain vanilla code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
def do(operator, arg1, arg2):
 if operator == '+':
 return _add(arg1, arg2)
 elif operator == '-':
 return _subtract(arg1, arg2)
 elif operator == '*':
 return _multiply(arg1, arg2)
 elif operator == '/':
 return _divide(arg1, arg2)
 elif operator == '^':
 return _power(arg1, arg2)
 else:
 raise ValueError('Calc Error - Operator not supported')

def _power(arg1, arg2):
 if arg1 &amp;lt; 1 or arg2 &amp;lt; 1:
 raise ValueError('Calc Error - Natural numbers only supported')
 return arg1 ** arg2

def _divide(arg1, arg2):
 if arg1 &amp;lt; 1 or arg2 &amp;lt; 1:
 raise ValueError('Calc Error - Natural numbers only supported')
 return arg1 / arg2

def _multiply(arg1, arg2):
 if arg1 &amp;lt; 1 or arg2 &amp;lt; 1:
 raise ValueError('Calc Error - Natural numbers only supported')
 return arg1 * arg2

def _subtract(arg1, arg2):
 if arg1 &amp;lt; 1 or arg2 &amp;lt; 1:
 raise ValueError('Calc Error - Natural numbers only supported')
 return arg1 - arg2

def _add(arg1, arg2):
 if arg1 &amp;lt; 1 or arg2 &amp;lt; 1:
 raise ValueError('Calc Error - Natural numbers only supported')
 return arg1 + arg2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Yeah, I know. This is pathetic code&amp;hellip; so many &lt;code&gt;if&lt;/code&gt;s and &lt;code&gt;elif&lt;/code&gt;s and all. That is on purpose so that we can improve it with some &lt;em&gt;decorator and pattern&lt;/em&gt; goodness. And it is code that works and hence our test passes! We are on &lt;em&gt;green&lt;/em&gt; mode &amp;amp; we can start refactoring.&lt;/p&gt;
&lt;h3 id="let-us-start-decorating"&gt;&lt;a href="#let-us-start-decorating" class="header-anchor"&gt;&lt;/a&gt;Let us start decorating
&lt;/h3&gt;&lt;p&gt;If you look at the above code we see an obvious copy paste case. The check for natural numbers is repeated on every operation code and we can easily &lt;strong&gt;decorate&lt;/strong&gt; each operation code using the Decorator pattern or in our case python decorators. Let us first look at the decorator code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
def only_natural(func):
 def wrapper(arg1, arg2):
 if arg1 &amp;lt; 1 or arg2 &amp;lt; 1:
 raise ValueError('Calc Error - Natural numbers only supported')

 return func(arg1, arg2)
return wrapper
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you know your decorators, this is a &lt;a class="link" href="https://realpython.com/primer-on-python-decorators/#simple-decorators" target="_blank" rel="noopener"
 &gt;simple decorator&lt;/a&gt; in action. It takes the function that needs to be wrapped. It defines an inner wrapper function which take two arguments which checks the arguments are natural numbers. If they are then the wrapped function is called else raise an error. Let us now use this decorator on our calculator module.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
def do(operator, arg1, arg2):
 if operator == '+':
 return _add(arg1, arg2)
 elif operator == '-':
 return _subtract(arg1, arg2)
 elif operator == '*':
 return _multiply(arg1, arg2)
 elif operator == '/':
 return divide(arg1, arg2)
 elif operator == '^':
 return _power(arg1, arg2)
 else:
 raise ValueError('Calc Error - Operator not supported')

@only_natural # decorator applied
def _power(arg1, arg2):
 return arg1 ** arg2 #1

@only_natural
def divide(arg1, arg2):
 return arg1 / arg2 #2

@only_natural
def _multiply(arg1, arg2):
 return arg1 * arg2 #3

@only_natural
def _subtract(arg1, arg2):
 return arg1 - arg2 #4

@only_natural
def _add(arg1, arg2):
 return arg1 + arg2 #5
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can see that our calculator is surely improved (note the numbers) using the &lt;em&gt;decorator&lt;/em&gt; pattern created with decorators. But the &lt;code&gt;do&lt;/code&gt; method is still a eyesore. With just 5 operations, we have a huge &lt;code&gt;if/elif/else&lt;/code&gt; clause and this will only grow further if we want to support more operations (I understand this is a toy example but you get the picture).&lt;/p&gt;
&lt;h3 id="enter-cor"&gt;&lt;a href="#enter-cor" class="header-anchor"&gt;&lt;/a&gt;Enter CoR
&lt;/h3&gt;&lt;p&gt;So how can we improve this. Let us dig in. It is clear that for each operation, there is a corresponding method to handle it. The handling determination happens one after the other. It almost feels like a set of actions to do&amp;hellip; a chain of things to do&amp;hellip; a Chain of Responsibilities to complete (come on, that is not such a bad lead up!). Let us give it a shot once.&lt;/p&gt;
&lt;p&gt;Before we get to the code let us understand a bit. A classic COR goes roughly like this. A request which needs to be processed is given to the first link in the chain of processors. That processor either processes it if it can or passes it on to the next processor. A given processor knows what it can process and also knows who is the next one in the chain. That is pretty much the essence of it. The class based style is already referred earlier, so let us try to do this with decorators which can work at method level.&lt;/p&gt;
&lt;p&gt;First shot:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
def cor(next):
 def wrapper(current):
 def inner(*args):
 output = current(*args)
 return output if output else next(*args) if next else None
 return inner
 return wrapper
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is a more involved decorator than the first one. Because we need to take an argument, we need this double nested structure. The outer most &lt;code&gt;cor&lt;/code&gt; function is the visible annotation part of the decorator and it takes the function object that needs to be called next in the chain as argument. The &lt;code&gt;cor&lt;/code&gt; function defines a &lt;code&gt;wrapper&lt;/code&gt; function which is the one that accepts the actual function that is being decorated - the &lt;code&gt;current&lt;/code&gt;. The &lt;code&gt;wrapper&lt;/code&gt; in turn has the &lt;code&gt;inner&lt;/code&gt; function where the actual work happens. It calls the current function and gets its response. If that response is valid (a simple &lt;em&gt;truthy&lt;/em&gt; response), then it means that request has been processed and the chain can be broken to return the result. If the response is not valid, it means that the current function is not the one to handle the request. Hence the control has to pass on to the next processor or function (which is available to &lt;code&gt;inner&lt;/code&gt; because it is a &lt;a class="link" href="https://en.wikipedia.org/wiki/Closure_%28computer_programming%29" target="_blank" rel="noopener"
 &gt;closure&lt;/a&gt; - another functional feature of python. You can read more about decorators that take arguments &lt;a class="link" href="https://realpython.com/primer-on-python-decorators/#decorators-with-arguments" target="_blank" rel="noopener"
 &gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For this to &lt;a class="link" href="https://realpython.com/primer-on-python-decorators/#nesting-decorators" target="_blank" rel="noopener"
 &gt;nest&lt;/a&gt; along with the already existing decorator for natural numbers, we need to do some changes to that decorator.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
def only_natural_with_operator(func):
 def wrapper(operator, arg1, arg2):
 if arg1 &amp;lt; 1 or arg2 &amp;lt; 1:
 raise ValueError('Calc Error - Natural numbers only supported')

 return func(operator, arg1, arg2)
 return wrapper
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above one is just a simple tweak, so let us move on. Let us look at the calculator to figure out how its usage gets manifested.&lt;/p&gt;
&lt;h3 id="what-the-cor"&gt;&lt;a href="#what-the-cor" class="header-anchor"&gt;&lt;/a&gt;What the CoR?
&lt;/h3&gt;&lt;pre&gt;&lt;code&gt;:::python
def do(operator, arg1, arg2):
 value = _add(operator, arg1, arg2)
 if value:
 return value
 else:
 raise ValueError('Calc Error - Operator not supported')

@only_natural_with_operator
def _power(operator, arg1, arg2):
 if operator == '^':
 return arg1 ** arg2
 else:
 return None

@only_natural_with_operator
@cor(next=_power)
def _divide(operator, arg1, arg2):
 if operator == '/':
 return arg1 / arg2
 else:
 return None

@only_natural_with_operator
@cor(next=_divide)
def _multiply(operator, arg1, arg2):
 if operator == '*':
 return arg1 * arg2
 else:
 return None

@only_natural_with_operator
@cor(next=_multiply)
def _subtract(operator, arg1, arg2):
 if operator == '-':
 return arg1 - arg2
 else:
 return None

@only_natural_with_operator
@cor(next=_subtract)
def _add(operator, arg1, arg2):
 if operator == '+':
 return arg1 + arg2
 else:
 return None
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hmm&amp;hellip; Pretty underwhelming to put it nicely. But before we get into it, let me first explain what this is doing.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;do&lt;/code&gt; method just calls the first method in the chain, the &lt;code&gt;_add&lt;/code&gt; method. It expects that the processing gets completed to return a valid result. If it gets back an invalid result (&lt;code&gt;None&lt;/code&gt;), then it understands that this calculation cannot be processed and throws an Error. The &lt;code&gt;do&lt;/code&gt; method has improved for sure.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;_add&lt;/code&gt; method declares the next operator/function to call as decorator parameter - (&lt;code&gt;@cor(next=_subtract)&lt;/code&gt;). In the body it checks if it can process the request - &lt;em&gt;is it the right operator?&lt;/em&gt; . If it is then great, else it returns &lt;code&gt;None&lt;/code&gt; denoting that it is not interested. This happens in each operator/function till we reach &lt;code&gt;_power&lt;/code&gt; which has no next. So the chain stops here. We can of course extend the chain from this point onwards and for that we don&amp;rsquo;t have to touch the &lt;code&gt;do&lt;/code&gt; or the &lt;code&gt;_add&lt;/code&gt; (or other) methods. All the methods are separated. This &lt;code&gt;cor&lt;/code&gt; decorator could be used to create a chain of any set of functions as long as they follow the basic contract of returning a truthy value if they did the processing or a falsy value if they want to pass it on (provided if they have defined a next).&lt;/p&gt;
&lt;h3 id="cor-20"&gt;&lt;a href="#cor-20" class="header-anchor"&gt;&lt;/a&gt;CoR 2.0?
&lt;/h3&gt;&lt;p&gt;Now back to that bad feeling we get on seeing the resultant code. In the process of introducing CoR to save the &lt;code&gt;do&lt;/code&gt; method, the operation functions have lost their charm. They are crowded now and that is not what we want. And when we look closely, we see that each operation function does one common thing: it checks if the operation is what it can handle, before it actually does the real work. The error handling in the &lt;code&gt;do&lt;/code&gt; function looks similar in some way too. All these seem to be common behavior which can be applied to these functions using a &lt;em&gt;wrapper/decorator&lt;/em&gt; - is it not? Let us get our decorator pattern back now. The improved cor (2.0) decorator looks like this.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
def calc_cor(my_operator, next=None):
 def wrapper(current):
 def inner(*args):
 if args[0] == my_operator:
 return current(*args)
 elif next:
 return next(*args)
 else:
 raise ValueError('Calc Error - Operator not supported')
 return inner
 return wrapper
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is no longer the very generic &lt;code&gt;cor&lt;/code&gt; decorator we started with but we sort of expected that. This is a decorated-calculator-specific-CoR - &lt;code&gt;calc_cor&lt;/code&gt;. This decorator takes two arguments. The first one is the operator supported by the current function and the second one is the next function. It also expects the the &lt;em&gt;current&lt;/em&gt; function (which is being decorated) to always takes the operator symbol as the first argument - the implicit contract. Since the operator is passed, the check of applicability can be done in the decorator itself. Also it does the error handling. This is the &lt;em&gt;decorated&lt;/em&gt; part of the new CoR. Now let us see how this changes our calculator code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
def do(operator, arg1, arg2):
 return _add(operator, arg1, arg2)


@only_natural_with_operator
@calc_cor(my_operator='^')
def _power(operator, arg1, arg2):
 return arg1 ** arg2


@only_natural_with_operator
@calc_cor(my_operator='/', next=_power)
def _divide(operator, arg1, arg2):
 return arg1 / arg2


@only_natural_with_operator
@calc_cor(my_operator='*', next=_divide)
def _multiply(operator, arg1, arg2):
 return arg1 * arg2


@only_natural_with_operator
@calc_cor(my_operator='-', next=_multiply)
def _subtract(operator, arg1, arg2):
 return arg1 - arg2


@only_natural_with_operator
@calc_cor(my_operator='+', next=_subtract)
def _add(operator, arg1, arg2):
 return arg1 + arg2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That looks way better than what we had before. The &lt;code&gt;do&lt;/code&gt; method just calls the first link in the chain. Each chain link just does its processing. Everything else is just declared as decorator arguments and we are done. This combination of COR and Decorator pattern using decorators seems to have produced the best results. Wouldn&amp;rsquo;t you agree?&lt;/p&gt;
&lt;h3 id="centralized-cor--30"&gt;&lt;a href="#centralized-cor--30" class="header-anchor"&gt;&lt;/a&gt;Centralized CoR -3.0!?!
&lt;/h3&gt;&lt;p&gt;I showed this result to Sathia, a &lt;a class="link" href="https://twitter.com/sathia27" target="_blank" rel="noopener"
 &gt;friend&lt;/a&gt; and colleague of mine (that was different production code but the concept is the same). He pointed out something. With this design somebody trying to add a new operator has to figure out where in the chain she needs to add it. Rather she has to figure out where the current chain ends and add the new one there. In the above example that is simple. In real world code this may or may not be easy. He wanted to see if there is a way for each operator function to just register itself and then the chain would execute them. Of course in all these cases we are talking with the underlying premise that the operator processing order does not matter.&lt;/p&gt;
&lt;p&gt;So some more thinking is needed. Can we make the CoR satisfy this? For this, we probably have to give away the decentralized nature of the current CoR. We need some kind of centralization. We need some way to register operation functions to a common place and then &lt;em&gt;pull the chain&lt;/em&gt; to execute them all. Here goes another shot.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
CHAIN = []

def link_to_chain(predicate):
 def wrapper(operator):
 CHAIN.append((predicate,operator))
 return operator
 return wrapper


def pull_chain(*args):
 for predicate,operator in CHAIN:
 if predicate(*args):
 return operator(*args)

 raise ValueError('Calc Error - Operator not supported')
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The first function &lt;code&gt;link_to_chain&lt;/code&gt; is a decorator function which registers (or links) the &lt;em&gt;operator&lt;/em&gt; and its &lt;em&gt;predicate&lt;/em&gt; into a registry or chain &lt;code&gt;CHAIN&lt;/code&gt;. The predicate is nothing but a function or lambda which provides applicability check. In this case the decorator is not really doing any decoration (no pre or post processing). It is more a way to &lt;a class="link" href="https://realpython.com/primer-on-python-decorators/#registering-plugins" target="_blank" rel="noopener"
 &gt;plug things&lt;/a&gt; in.&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;pull_chain&lt;/code&gt; function executes the CoR. It runs through the chain of handlers, uses the registered predicate to find the right one, executes them and breaks out of the chain. If there is none found then it &lt;em&gt;raises&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;With this idea now the calculator looks like this&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
def do(operator, arg1, arg2):
 return pull_chain(operator, arg1, arg2)


@link_to_chain(lambda *args: args[0]=='^')
@only_natural_with_operator
def _power(operator, arg1, arg2):
 return arg1 ** arg2


@link_to_chain(lambda *args: args[0]=='*')
@only_natural_with_operator
def _multiply(operator, arg1, arg2):
 return arg1 * arg2


@link_to_chain(lambda *args: args[0]=='/')
@only_natural_with_operator
def _divide(operator, arg1, arg2):
 return arg1 / arg2


@link_to_chain(lambda *args: args[0]=='+')
@only_natural_with_operator
def _add(operator, arg1, arg2):
 return arg1 + arg2


@link_to_chain(lambda *args: args[0]=='-')
@only_natural_with_operator
def _subtract(operator, arg1, arg2):
 return arg1 - arg2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Not bad at all! Actually looks pretty good to me. Individual functions link to the chain and the &lt;code&gt;do&lt;/code&gt; method pulls the chain. The single responsibility of the functions shine through. Given that the chain is centralized, the individual functions don&amp;rsquo;t even care about who is next. All they do is register into the chain along with their predicate. This is probably the cleanest solution we can get as of now. Time to stop and take a break!&lt;/p&gt;
&lt;h2 id="closing-thoughts"&gt;&lt;a href="#closing-thoughts" class="header-anchor"&gt;&lt;/a&gt;Closing thoughts
&lt;/h2&gt;&lt;p&gt;Python is great language with support for useful functional features. Decorators are a sweet way of doing functional programming in python. The great thing I realized in this attempt is, when we try to do functional programming, your earlier learnings of GOF design patterns don&amp;rsquo;t go waste. The ideas still make sense. All we need to do was to tweak them a bit to make them applicable in a functional context. And lo behold we have much better code than where we started &amp;hellip;the &lt;code&gt;if/elif/else&lt;/code&gt; blob in the beginning&amp;hellip; Let us keep learning and try to extract out the essence of the things we learn. Then we might actually be able use it in more than one places and in more than one ways.&lt;/p&gt;
&lt;p&gt;Happy development to all in the festive season! Please chime in with your thoughts and comments. Your criticisms and improvements are most welcome since I learn a lot from them. See you soon.&lt;/p&gt;
&lt;p&gt;p.s: You can get all this code &lt;a class="link" href="http://bit.ly/2mMojaa" target="_blank" rel="noopener"
 &gt;here&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Caching in Microservices</title><link>https://www.nacnez.com/caching-in-microservices.html</link><pubDate>Sun, 15 Sep 2019 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/caching-in-microservices.html</guid><description>

&lt;div class="admonition note"&gt;
 &lt;p class="admonition-title"&gt;TL;DR&lt;/p&gt;
 &lt;div class="admonition-content"&gt;Caching in microservices can help with improving performance and scaling if used wisely. Opt for service level domain aggregate caches and use mashed up object caching on client services only when you are trying to speed-up/avoid local processing on remote data. Don&amp;rsquo;t use blackboard caches and remember cache cannot be a source of truth or a permanent data store.&lt;/div&gt;
&lt;/div&gt;



&lt;div class="admonition note"&gt;
 &lt;p class="admonition-title"&gt;Origin Note&lt;/p&gt;
 &lt;div class="admonition-content"&gt;This article is based on a talk I gave at an event hosted by &lt;a class="link" href="https://everest.engineering/#events" target="_blank" rel="noopener"
 &gt;Everest Engineering&lt;/a&gt;. The article serves both as a independent reference on the topic for anybody and a refresher for people who attended the talk.&lt;/div&gt;
&lt;/div&gt;

&lt;h2 id="why-caching-in-microservices"&gt;&lt;a href="#why-caching-in-microservices" class="header-anchor"&gt;&lt;/a&gt;Why caching in Microservices
&lt;/h2&gt;&lt;p&gt;Microservices offer us a lot of advantages but they are not a silver bullet. Every architecture tries to satisfy the &lt;strong&gt;“ities”&lt;/strong&gt; . This architecture style is no different. It is very promising but it is not without its trade-offs.&lt;/p&gt;
&lt;p&gt;Everyone has heard of caching. It is prevalent in our world of computers and software at multiple levels. From the CPU level L1/L2 cache, to in-memory caches in our monoliths, all of us would have seen caching in some place or the other. Why is it used? There are two desirable characteristics for any user feature:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Respond to the user very fast - performance.&lt;/li&gt;
&lt;li&gt;Respond to a lot of users - scale.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And caching can help with both.&lt;/p&gt;
&lt;br/&gt;
But do microservices need them? Microservices already offer a lot of good qualities to our systems - like independent scaling, independent data storage for better performance etc. . So should we care about caching. Also caching is not the easiest thing. You might have read about the saying in Martin Fowler's bliki - [Two Hard Things](https://martinfowler.com/bliki/TwoHardThings.html):


&lt;div class="admonition danger"&gt;
 
 &lt;div class="admonition-content"&gt;&lt;strong&gt;There are only two hard things in Computer Science: cache invalidation and naming things&lt;/strong&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;To answer this let us dig deeper to identify challenges which microservices introduces.&lt;/p&gt;
&lt;h4 id="use-case---viewingediting-an-online-document"&gt;&lt;a href="#use-case---viewingediting-an-online-document" class="header-anchor"&gt;&lt;/a&gt;Use case - Viewing/Editing an online document
&lt;/h4&gt;&lt;p&gt;&lt;img alt="Editing online document" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/caching_in_ms/usecase1.png"&gt;&lt;/p&gt;
&lt;br/&gt;
The use case is pretty common. So let us look at potential architecture for making this work. For showing a single document to the end user there are 5 - 6 services involved if we adopt microservices architecture.
&lt;p&gt;&lt;img alt="Editing online document - Architecture" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/caching_in_ms/usecase1-archi.png"&gt;&lt;br&gt;
&lt;br/&gt;&lt;/p&gt;
&lt;p&gt;The individual components are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Document service - This one serves the original document.&lt;/li&gt;
&lt;li&gt;Comments service - This one provides the various comments created on top of the document by different users.&lt;/li&gt;
&lt;li&gt;Authentication service - This is a system service which ensures that the call to the document service is from an authenticated user. This could be API gateway but I am representing it as a service so that it is clear that it is another layer/system involved in the interaction.&lt;/li&gt;
&lt;li&gt;Authorisation service - It checks if the user can see/edit the document - Action level authorisation.&lt;/li&gt;
&lt;li&gt;Tenant service - This ensures that the document requested belongs to the same tenant as the user - Data level authorisation&lt;/li&gt;
&lt;li&gt;User Document service - The Orchestrator. This talks to the underlying services and mashes up the final information and sends to the user.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Given the above architecture, let us think about performance. Generally a single request made by the user is expected to respond within 300-500 ms. The idea is that if the first byte comes through fast then, there is some time for the browser to visually display the content along with any client side processing it has to do within 2-3 secs.&lt;/p&gt;
&lt;p&gt;In the above microservices architecture instead of one service (monolith) returning within that time, all these 5 services should work together to respond within the same time. For simplicity, if we are thinking of splitting it up equally we are talking about 50-80 ms per service. That can be pretty tight. If the page is not ready for end user consumption in 2 - 3 seconds, the user will move to a different document editor provider.&lt;/p&gt;
&lt;p&gt;Microservices offer a lot of good. But in this context where we need great performance, the need to talk to multiple services to respond to one use case can mean a very slow and painful experience for the end user. Not good. We need to do something. &lt;em&gt;What can we do which will help us improve performance and scale?&lt;/em&gt; &lt;strong&gt;Caching!!&lt;/strong&gt; Applying caching to microservices allows us to hit our required goals. That does not mean that we apply caching to anything &amp;amp; everything. There are things to consider, things to manage.&lt;/p&gt;
&lt;p&gt;Now that we have established why caching is useful, let us get into more detail about caching. Let us start with what you would want to cache.&lt;/p&gt;
&lt;h2 id="what-to-cache"&gt;&lt;a href="#what-to-cache" class="header-anchor"&gt;&lt;/a&gt;What to cache
&lt;/h2&gt;&lt;p&gt;A general cache acts like a map or hash or dict. Pick your term based on your language of choice. Any object is added to the cache by identifying it with a key. A cache generally does not care what value it caches. You can then retrieve the value using the key. So we could cache any kind of object in a cache. But what should we cache?&lt;/p&gt;


&lt;div class="admonition attention"&gt;
 &lt;p class="admonition-title"&gt;Out of scope&lt;/p&gt;
 &lt;div class="admonition-content"&gt;Before we go deeper, I am not covering the entire topic of http caching. While http caching is useful in the context of microservices they are not really specific to them. It is applicable more generally.&lt;/div&gt;
&lt;/div&gt;

&lt;h4 id="domain-objectsaggregates"&gt;&lt;a href="#domain-objectsaggregates" class="header-anchor"&gt;&lt;/a&gt;Domain objects/aggregates
&lt;/h4&gt;&lt;p&gt;In the world of services (I will interchangeably use service and microservice because I believe microservice is just a SOA service done right), one of the primary things you should consider caching are domain aggregates or objects. Any given microservice generally deals with one primary domain aggregate or object (may be two if it makes sense). In the example we talked about earlier, we had an comment service whose primary domain object is comment. Similarly document could be the one for document service. Caching the primary domain aggregate/object means that all relevant information required by the client can be easily served up quicky without looking at multiple places - especially the database. The actual response could be a subset of the data, but caching the aggregate allows us to adapt &amp;amp; support many use cases. We know databases and associated disk reads can be the cause of big performance delays. By caching domain aggregates we make it much easier for the service to serve its clients. There are still things to consider here. We will discuss about it down the line.&lt;/p&gt;
&lt;h4 id="configurations"&gt;&lt;a href="#configurations" class="header-anchor"&gt;&lt;/a&gt;Configurations
&lt;/h4&gt;&lt;p&gt;Another thing we look at caching is configurations of a service. This one is fairly common even in the monolith world. Configurations generally don’t change much and are used in different parts of the app - hence they are a great candidate for caching.&lt;/p&gt;
&lt;h4 id="mashed-up-objects-with-processingcalculations"&gt;&lt;a href="#mashed-up-objects-with-processingcalculations" class="header-anchor"&gt;&lt;/a&gt;Mashed up objects with processing/calculations
&lt;/h4&gt;&lt;p&gt;The above two cases are straight-forward. Next thing to consider for caching is mashed up objects. This is typically employed by an orchestration service acting as client to other services, and it involves merging in responses from these services, doing some calculations or processing on top of them and caching the result. Again referring to the use case above, the user document service might take the document(s) from the document service and merge the applicable comments from comments service and cache these rich documents on its side. This means that you not only avoid round trips to other services but also don’t need to do the additional processing to match, merge and position them. This means better performance and also lesser load (hence better scale) for all the services involved. There are trade-offs involved here too and we will get to them.&lt;/p&gt;
&lt;p&gt;As a general advice, I would say that you should cache everything &lt;strong&gt;BUT&lt;/strong&gt; only if you can.&lt;/p&gt;
&lt;h2 id="where-to-cache"&gt;&lt;a href="#where-to-cache" class="header-anchor"&gt;&lt;/a&gt;Where to cache
&lt;/h2&gt;&lt;p&gt;Now that we know what to cache, let us talk about where to cache.&lt;/p&gt;
&lt;h4 id="in-service-memory"&gt;&lt;a href="#in-service-memory" class="header-anchor"&gt;&lt;/a&gt;In service memory
&lt;/h4&gt;&lt;p&gt;Within a service, we could just use an in process / in memory cache and improve performance with great ease. This works, but is applicable for a very limited set of use cases. One example is static configuration information. This is not very large in size can be stored in a in-memory, in-process cache. Given that any service worth its salt will be setup as a cluster in a production setup, we have a replicated cache in each of the service nodes. This cache will be the fastest of all since it is not just in memory, it is in same process as the service.&lt;/p&gt;
&lt;p&gt;The above approach allows us to get started, but falls apart soon. When we want to cache domain aggregates/objects, a clustered service will find it very difficult to keep changes in sync across the memories of multiple service nodes. Also, once you go down the path of caching and get the taste of performance gains, you will plan to cache a more in memory. This means that the cache is competing for memory with the actual service procesing requests. This can lead to reduction of service scale. It is time to move out of service memory.&lt;/p&gt;
&lt;h4 id="out-of-service-memory---standalone"&gt;&lt;a href="#out-of-service-memory---standalone" class="header-anchor"&gt;&lt;/a&gt;Out of service memory - Standalone
&lt;/h4&gt;&lt;p&gt;The first obvious choice here is to have a standalone caching solution which can be reached by different service nodes for both reading and writing data. This is obviously going to be slower than the in-process cache but it will still be faster than going to the database and doing disk reads. Also given that it is separated from individual service nodes it removes the overhead created by cache storage on the individual nodes. Typical solutions used here are Redis, Memcached etc.&lt;/p&gt;
&lt;h4 id="out-of-service-memory---distributed"&gt;&lt;a href="#out-of-service-memory---distributed" class="header-anchor"&gt;&lt;/a&gt;Out of service memory - Distributed
&lt;/h4&gt;&lt;p&gt;When we want scale these even further, we get into distributed caching and in-memory data grids. These solutions allow for multiple nodes holding a large amount of data in memory for faster response and higher scale. It is not uncommon to have a 100 node cluster of in-memory data grid machines which are hosting terabytes of data in memory by employing partitioning of data across different nodes.&lt;/p&gt;
&lt;p&gt;Each of these individual solutions provide a lot of different features but that is not our focus.&lt;/p&gt;
&lt;p&gt;What we have covered now is a broad base of locations where data could be cached. Each location of storage has pros and cons and are suited depending on our needs.&lt;/p&gt;
&lt;h2 id="when-to-cache"&gt;&lt;a href="#when-to-cache" class="header-anchor"&gt;&lt;/a&gt;When to cache
&lt;/h2&gt;&lt;p&gt;We now know what to cache and where to cache it. Now let us discuss when we would cache any data.&lt;/p&gt;
&lt;h4 id="on-demand"&gt;&lt;a href="#on-demand" class="header-anchor"&gt;&lt;/a&gt;On Demand
&lt;/h4&gt;&lt;p&gt;One approach to populate the cache with data is when it is required. When a particular piece of data is requested and the cache does not have the same, then the data is picked up from the source, the cache seeded with the same and then returned back to the requester. This is the &lt;em&gt;On Demand&lt;/em&gt; mode of populating a cache. This mode can work in most scenarios but has a couple of drawbacks. The first request which populates the cache will be very slow and leads to a bad experience to that end user(s). The other one that if there are multiple service nodes which request for the same entry then it could cause database contention.&lt;/p&gt;
&lt;h4 id="pre-loading"&gt;&lt;a href="#pre-loading" class="header-anchor"&gt;&lt;/a&gt;Pre-loading
&lt;/h4&gt;&lt;p&gt;The other approach to when to cache is to pre-load data upfront. As part of the service initialisation process, the cache was seeded with required data. This means that there is a huge load on the data store during start up and hence a potential delay in start up. But once the loading is complete, the cache is primed and end user experience is great - no more delays even for the first user. And if you cache most of the relevant data, we might even survive a db outage! One problem with this is that, we don’t know what to cache if we are not planning to cache everything.&lt;/p&gt;
&lt;h2 id="how-to-cache---patterns"&gt;&lt;a href="#how-to-cache---patterns" class="header-anchor"&gt;&lt;/a&gt;How to cache - Patterns
&lt;/h2&gt;&lt;p&gt;Let us get into details of how caching can be implemented within microservices. There are some well known patterns for reading and writing to cache. These have their pros and cons as well. Also they are not mutually exclusive in any way. They generally work together to solve problems. Let us go through them one by one.&lt;/p&gt;
&lt;h4 id="cache-aside"&gt;&lt;a href="#cache-aside" class="header-anchor"&gt;&lt;/a&gt;Cache aside
&lt;/h4&gt;&lt;p&gt;&lt;img alt="Cache aside pattern" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/caching_in_ms/cache_aside.png"&gt;&lt;/p&gt;
&lt;p&gt;The first one is the &lt;em&gt;Cache aside&lt;/em&gt; pattern. This is the most common pattern and used extensively. The idea of the pattern is to treat cache as a different store similar to the database. A service would read and write to the database and the cache as an aside. The control of what and when data are written into or read from the cache lies with the service itself. This pattern is great for read heavy workloads. Also we could write the service in such a way that during a failure in cache setup - when we use standalone/grid mode - the service can still keep serving from db. Of course this can’t be sustained for long given the cache setup is to support scale, but the option is there. The approach for when writes happen depends on us. Writing to database is the first thing the service will do - almost always. What happens to the cached entry is subject to developers choice - the patterns leaves this open to us. One thing to do is to just remove or invalidate the entry from the cache. There are others options available.&lt;/p&gt;
&lt;p&gt;I prefer this approach because as a business service writer I have lot more control with this approach. Hence I have used it a lot as well.&lt;/p&gt;
&lt;br/&gt;
Sometimes we really don’t want so much control. Rather we want convenience and ease of use. The following patterns afford this one way or other and the unifying aspect of these patterns is that the caching library or system acts as the facade and controls how data is written/read to/from the underlying source data store.
&lt;h4 id="read-through"&gt;&lt;a href="#read-through" class="header-anchor"&gt;&lt;/a&gt;Read through
&lt;/h4&gt;&lt;p&gt;&lt;img alt="Read through pattern" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/caching_in_ms/read_through.png"&gt;&lt;/p&gt;
&lt;p&gt;The first one among them is the &lt;em&gt;Read-Through&lt;/em&gt; pattern. Here the cache, when requested for a entry and not finding it, will initiate a call to the underlying store to read the data. It will then cache it and return the data to requester. The key thing to note here is, the cache is the one orchestrating the action. This is different from how cache aside pattern works where the control is with the service code. Also Read through pattern follows lazy or on-demand loading and hence has the same caveats. We must also remember that in this pattern the data structure cached must match with the structure stored in the underlying store.&lt;/p&gt;
&lt;p&gt;Even in Cache aside, we could follow a similar technique of lazy loading when writes happen (i.e writes just invalidates the corresponding entry in cache if it exists) if the applicable caveats work for you.&lt;/p&gt;
&lt;h4 id="write-through"&gt;&lt;a href="#write-through" class="header-anchor"&gt;&lt;/a&gt;Write Through
&lt;/h4&gt;&lt;p&gt;The &lt;em&gt;Write Through&lt;/em&gt; pattern is about writing data. This is similar to Read-Through - the cache system sits in between the service code and database. With this approach when changes are made to the cached entity, the service writes into the cache and that in turn writes into the database. Both writes need to be completed before completion of request. This adds a bit of an overhead to the write operation but when combined with Read Through pattern it gives a lot of benefits. The write through pattern ensures that entries in the cache are not out-dated or stale. So we have consistent data available at very high speeds for reads. This is great for a cache.&lt;/p&gt;
&lt;p&gt;Even with the Cache Aside pattern, we generally employ a similar approach to read through and write through. The difference is of course that the service controls the entire interaction rather the cache system.&lt;/p&gt;
&lt;h4 id="write-around"&gt;&lt;a href="#write-around" class="header-anchor"&gt;&lt;/a&gt;Write-Around
&lt;/h4&gt;&lt;p&gt;&lt;em&gt;Write-Around&lt;/em&gt; Cache is a slightly different from the older one. Here the write happens only to the database and the cache is updated only during a read through. There are some advantages - writes are faster but at the same time they are durable (since db is written). But reads could miss cache or even return stale data. This approach is great for write heavy workloads where reads are much less - e.g. is real time logs.&lt;/p&gt;
&lt;h4 id="write-back-or-write-behind"&gt;&lt;a href="#write-back-or-write-behind" class="header-anchor"&gt;&lt;/a&gt;Write-Back or Write-Behind
&lt;/h4&gt;&lt;p&gt;&lt;em&gt;Write-Back or Write-Behind&lt;/em&gt; Cache is another variation. Here the service writes to the cache and returns. The cache will write to the DB behind the scenes with some potential delay. Of course writes are super-fast but there are chances of missed writes too. Combined with read through, you get a good cache times for most mixed workloads - you always have the recently updated and accessed data. Also one can argue that it is resilient to db failures - (but how long? - keep that in mind). Another thing possible is that multiple writes to the same object could be coalesced into one write to the db.&lt;/p&gt;
&lt;br/&gt;
As I said earlier these are general patterns which have trade-offs. And they are always combined. In my own opinion, treating a cache as a data source is rarely a good idea. Unless you have throwaway data or what you holding is always derived reconstructable data. If not stick to the more durable write patterns always.
&lt;h2 id="how-long-to-cache---invalidation"&gt;&lt;a href="#how-long-to-cache---invalidation" class="header-anchor"&gt;&lt;/a&gt;How Long to Cache - Invalidation
&lt;/h2&gt;&lt;p&gt;We are now embarking on the one of toughest problems in computer science! (referred already). In my experience this is a true statement.&lt;/p&gt;
&lt;p&gt;Any cache we create is an alternate store of data and cache is not the source. That means it is bound to go out of sync with the source. This is called as going &lt;em&gt;stale&lt;/em&gt;. Unlike stale food, stale data from cache is not always bad. That said we can’t keep having stale data and serve our clients with the same. How long we can use stale data depends on your business scenario.&lt;/p&gt;
&lt;p&gt;News sites with stories could show some stale data - slightly older news - may be few hours. But a stock ticker like app which enables users to trade cannot real work with stale data! So it depends.&lt;/p&gt;
&lt;p&gt;Let us figure out how to get out of this stale state.&lt;/p&gt;
&lt;h4 id="expiry"&gt;&lt;a href="#expiry" class="header-anchor"&gt;&lt;/a&gt;Expiry
&lt;/h4&gt;&lt;p&gt;One of the ways to deal with staleness is expiry. Depending on the data you are trying to cache, you generally know how long the data can remain fresh and live. If so, we can set the data to expire. This is generally called Time To Live or ttl. Most caching frameworks will drop the data once it passes ttl - either actively or passively. A request for this expired data will result in a cache miss. The next step depends on the caching patterns you use. Many caching frameworks allow us to set this expiry at the bucket level (all new stories) as well as individual item (a particular new story) level - we can use any as required.&lt;/p&gt;
&lt;h4 id="service-based"&gt;&lt;a href="#service-based" class="header-anchor"&gt;&lt;/a&gt;Service based
&lt;/h4&gt;&lt;p&gt;While expiration is a reasonable way of handling invalidation, we could handle it more actively. When we use caching within a service boundary, a service has control over the data which it is caching and hence can actively manage the invalidation of stale data. For example when more comments are added to a document, the change happens through the service and it can actively manage the cache invalidation. This is one of the reasons I prefer the service based approach.&lt;/p&gt;
&lt;h4 id="events-based"&gt;&lt;a href="#events-based" class="header-anchor"&gt;&lt;/a&gt;Events based
&lt;/h4&gt;&lt;p&gt;Another way invalidation can be achieved is through events. This technique is especially applicable when orchestration service clients cache mashed up data. When the object owner service finds that data has changed, it sends out an event to an event bus or MOM. This is consumed by the orchestration service to take appropriate action.&lt;/p&gt;
&lt;h2 id="two-more-concepts-on-caching"&gt;&lt;a href="#two-more-concepts-on-caching" class="header-anchor"&gt;&lt;/a&gt;Two more concepts on Caching
&lt;/h2&gt;&lt;h4 id="measurements"&gt;&lt;a href="#measurements" class="header-anchor"&gt;&lt;/a&gt;Measurements
&lt;/h4&gt;&lt;p&gt;Anything we do, we should measure. There is a saying in Tamil&lt;/p&gt;


&lt;div class="admonition info"&gt;
 
 &lt;div class="admonition-content"&gt;&lt;p&gt;&lt;strong&gt;ஆற்றில் போட்டாலும் அளந்து போடு&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Even when you are just going to throw something into the river you should measure and throw it.&lt;/em&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;One of the critical measurements for any caching setup is the cache hit ratio. Every one understands what a cache hit is - when a cache access succeeds. And a cache miss when you miss. So cache hit ratio is:&lt;/p&gt;


&lt;div class="admonition tip"&gt;
 
 &lt;div class="admonition-content"&gt;&lt;strong&gt;Cache Hit Ratio&lt;/strong&gt; = &lt;em&gt;Cache Hit&lt;/em&gt; &lt;strong&gt;/&lt;/strong&gt; (&lt;em&gt;Cache Hit&lt;/em&gt; &lt;strong&gt;+&lt;/strong&gt; &lt;em&gt;Cache Miss&lt;/em&gt;)&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;For caching to be considered effective, the data cached must have a good cache hit ratio. If you have a low cache hit ratio then you are surely doing something wrong. Either you are using the wrong cache patterns or you are caching the wrong data. Any changes you want to do related to caching (change methods/techniques or something else) must keep the cache hit ratio in mind. Any change reducing the cache hit ratio is a bad idea.&lt;/p&gt;
&lt;h4 id="eviction"&gt;&lt;a href="#eviction" class="header-anchor"&gt;&lt;/a&gt;Eviction
&lt;/h4&gt;&lt;p&gt;We talked about expiry a lot. There is another concept which people consider closely related to it - Eviction. Actually eviction is very different from Expiry. It has more connection to the &lt;em&gt;cache hit ratio&lt;/em&gt; and &lt;em&gt;what to cache&lt;/em&gt; question. Both expiry and eviction deal with removal of entries, but their causes and purposes are completely different.&lt;/p&gt;
&lt;p&gt;Cache eviction comes into play because memory is a finite resource - for the most part that is. While I would love to cache the entire database it is just not economical to do it. So once the amount we cache exceeds a number limit or memory limit, any addition of entry means some other entry needs to be removed out of memory. This process is called eviction. Eviction is generally done based on some algorithmic strategy. Different caching frameworks provide many different algorithms. The most common ones are LRU, LFU, FIFO.&lt;/p&gt;
&lt;p&gt;LRU is the most common is generally considered a reasonable default. It is considered a close proxy to the most optimal caching algorithm. The specific reason is due to Locality of reference. This is easily explained in the context of caching at the CPU level where the recently used data or instruction is repeatedly requested by the CPU. This is called Temporal Locality. The same phenomenon applies to the real world usage of cached data too. We can understand this intuitively. For example most times when data is created it is immediately accessed. Also when real users surf through data like products they tend to return to see the same products again and again. Another example is generally items like dresses or vehicles come into trend in time cycles (or may be because there is a big sale going on). Temporal locality makes sense. In my experience of using caches, I have never needed to change the eviction algorithm to something else. Nor have I heard of any real life usage of any other algorithm - that is anecdotal for sure but I am pretty convinced.&lt;/p&gt;
&lt;p&gt;Changing a caching algorithm to something else is mostly a configuration change. The more important thing is, when we make such a change, we need to measure cache hit ratios and average response times and see how they are affected.&lt;/p&gt;
&lt;h2 id="conclusion---summary-of-opinions"&gt;&lt;a href="#conclusion---summary-of-opinions" class="header-anchor"&gt;&lt;/a&gt;Conclusion - Summary of Opinions
&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;Preferred Approach - Service Caching&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I prefer to use service managed caches as an approach to caching. Given that service owns the data, as a service developer I have a much clearer understanding of how and when data changes and hence I can make decisions more easily. With this approach clients are unaware of what is happening and hence they are not affected by any changes to mode/mechanism of caching. I can keep tweaking the implementation as long as I satisfy the performance SLA. I can keep improving performance or scale without having clients to have to change anything. A service can internally use in process caching or stand alone caching to begin with and then move to an IMDG as it needs more scale. All good right!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;But you sometimes need - Orchestrator/Client side caching&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Not really. Service level caching does not solve all scenarios. Clients sometimes want even better response times than what service level caching can provide. Network latency could be one reason. I generally don’t really think it is a great argument since once you want to scale the client you would need an out of process cache and then the network latency is back. But that is not the only reason. There are situations where client services mash up data from multiple services and do some processing on top and use it. In such cases it might be required for that service to cache the outcome of the processing to quickly serve clients. I have done the same in one of previous situations because it was needed to meet the SLA for the service - to keep real users happy. Though this approach is sometimes required, we must understand that it is a complex thing to manage. We need to build in checks which will ensure that this cache data still ties back to original data source services - potentially an event based mechasim.&lt;/p&gt;
&lt;p&gt;** Never ever Shared Caches**&lt;/p&gt;
&lt;p&gt;One of ways which I have seen caching being used is like a blackboard where some service can write something and another service can read the same. This is possible to do but I am not in favour of it. This feels very much like multiple services using the same underlying database - a global namespace. Any change cannot be done in an isolated manner and every service can touch or be touched by all changes happening on the shared cache. So beware of it. I am not saying that this cannot be done. It feels more dirty and complicated and hence can turn ugly if we are not very careful.&lt;/p&gt;
&lt;p&gt;** And not really a replacement to DB**&lt;/p&gt;
&lt;p&gt;And last piece of advice or opinion. Never treat your cache as your database even if it super reliable with great clustering features. Some IMDG vendors say that it is possible. In my experience that is not what they are good at and hence they don’t work well as good persistent stores.&lt;/p&gt;
&lt;p&gt;I am done. Share your thoughts or questions through comments below.&lt;/p&gt;
&lt;p&gt;For related microservices reading: &lt;a class="link" href="https://www.nacnez.com/micro-service-size.html" &gt;The Right size of a µService?&lt;/a&gt; explores the architectural forces that determine how big or small a service should be, and &lt;a class="link" href="https://www.nacnez.com/2-%c2%b5-services-chat-timeout.html" &gt;µservices gossip: Take a timeout!&lt;/a&gt; covers another key resilience pattern — timeouts — through a fun fictional conversation.&lt;/p&gt;</description></item><item><title>Nginx Serves Us like this - Maybe</title><link>https://www.nacnez.com/nginx-working-deepdive.html</link><pubDate>Sat, 31 Mar 2018 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/nginx-working-deepdive.html</guid><description>&lt;p&gt;Nginx is one of the projects which I always felt a pull towards, owing to it architecture. It is &amp;ldquo;event driven&amp;rdquo;!. For some time, I have heard this but I always wanted to get more deeper into it. So I did some digging on how nginx works. I read many articles (will be referred below) and pieced it together to the best of my understanding. Here is my attempt to explain how I think it works!&lt;/p&gt;
&lt;p&gt;Of course take this with generous helping of salt:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;I don&amp;rsquo;t have much knowledge on linux internals and syscalls - so whatever I describe is surely going to have faults/mistakes. I look forward to get help from others to correct it.&lt;/li&gt;
&lt;li&gt;Another reason is that I did not go through the nginx source code. I don&amp;rsquo;t have expertise in C and I am too scared to peep into nginx codebase for the fear of getting completely lost.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now that is out of the way let us get started. If you want the basics of getting nginx running first, see &lt;a class="link" href="https://www.nacnez.com/nginx-ubuntu.html" &gt;Setting up a nginx virtual host on Ubuntu&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="background---process-roles"&gt;&lt;a href="#background---process-roles" class="header-anchor"&gt;&lt;/a&gt;Background - Process Roles
&lt;/h2&gt;&lt;p&gt;&lt;img alt="The Nginx Master and Workers" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/nginx-art01.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Okay. Before we get started let us get some background on the nginx processes.&lt;/p&gt;
&lt;p&gt;Nginx follows an event driven architecture and has different types of processes doing specific kinds of tasks. Let me first describe these process type and their roles. Once that is out of the way, I can get to more details on how the nginx startup and processes requests.&lt;/p&gt;
&lt;p&gt;The four different kinds of processes are:&lt;/p&gt;
&lt;h4 id="master"&gt;&lt;a href="#master" class="header-anchor"&gt;&lt;/a&gt;Master
&lt;/h4&gt;&lt;p&gt;The master process is what starts up and manages the lifecycle of all nginx processes.&lt;/p&gt;
&lt;h4 id="worker"&gt;&lt;a href="#worker" class="header-anchor"&gt;&lt;/a&gt;Worker
&lt;/h4&gt;&lt;p&gt;This is the work horse of nginx. This process is the one which does all processing for client requests. Reverse proxying, load balancing, compression, ssl termination etc. are all done by this process. Generally there could more than one of these processes running at any given time.&lt;/p&gt;
&lt;h4 id="cache-related-processes"&gt;&lt;a href="#cache-related-processes" class="header-anchor"&gt;&lt;/a&gt;Cache related processes
&lt;/h4&gt;&lt;ul&gt;
&lt;li&gt;Cache loader process
This process checks the on-disk cache items and populates nginx in-memory db with cache metadata. It prepares nginx to work with files already cached and exits after updating in-memory db&lt;/li&gt;
&lt;li&gt;Cache manager process
This process manages cache expiration and invalidation. It stays in memory.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That should be enough background. Let us deep dive into how nginx starts and processes requests. For this discussion the processes under focus are only the master and the worker processes.&lt;/p&gt;
&lt;h3 id="see-it-yourselves"&gt;&lt;a href="#see-it-yourselves" class="header-anchor"&gt;&lt;/a&gt;See it yourselves
&lt;/h3&gt;&lt;p&gt;If you want to see these processes in action. Do the following (assuming you have done the installation):
Open a terminal/shell and execute&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::shell
watch -n 1 &amp;quot;sudo ps -eFww --forest | grep 'nginx\|PID'&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In another terminal execute&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::shell
sudo nginx
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You can drop the &lt;code&gt;sudo&lt;/code&gt; if your nginx does not have reserved ports configured for listening.&lt;/p&gt;
&lt;p&gt;Once you start nginx, you should see the processes in the first terminal window. Keep watching it for sometime (you might notice something).&lt;/p&gt;
&lt;h2 id="nginx-startup"&gt;&lt;a href="#nginx-startup" class="header-anchor"&gt;&lt;/a&gt;Nginx startup
&lt;/h2&gt;&lt;p&gt;You start nginx by calling &lt;code&gt;nginx&lt;/code&gt;. Let us look at what each of the main processes do at this point&lt;/p&gt;
&lt;h3 id="the-master-a-true-leaderdelegator"&gt;&lt;a href="#the-master-a-true-leaderdelegator" class="header-anchor"&gt;&lt;/a&gt;The Master (A true leader/delegator)
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Master startup flow" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/nginx-MasterStartupFlow.jpg"&gt;&lt;/p&gt;
&lt;p&gt;The first process to start is the master process. It first reads through, validates and compiles the configuration. Once the configuration is validated and compiled, it looks at the configuration to figure out what all listen sockets have to be created for serving client requests.&lt;/p&gt;
&lt;p&gt;The server connection establishment process starts at this point for the required listen sockets. As a server (role played in client server communication), the master first tries to create sockets and bind to the ports defined in the configuration. One thing to note is that if the defined ports belong to the reserved set, the nginx needs to be started as a privileged user (root/sudo). Once the socket is created and binded it will also set the socket to listen mode with a default backlog of 511 (read more about listen backlog from references).&lt;/p&gt;
&lt;p&gt;The next step the nginx master does is to start the worker processes. This is typically done by forking (&lt;code&gt;clone&lt;/code&gt;) them out as a child process (this is my assumption/understanding). This also means that listen sockets descriptors are copied over to the child processes and are hence accessible to the workers. The compiled configuration is also passed onto the them. The number of worker processes to be created is based on configuration. The typical default is &lt;code&gt;auto&lt;/code&gt; which leads to the creation as many workers as there are cores in the machine (or VM).&lt;/p&gt;
&lt;p&gt;&lt;img alt="Syscalls made by master at startup" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/nginx-MasterAtStart.png"&gt;&lt;/p&gt;
&lt;h3 id="the-worker-i-am-awake"&gt;&lt;a href="#the-worker-i-am-awake" class="header-anchor"&gt;&lt;/a&gt;The Worker (I am awake!)
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Worker startup" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/nginx-WorkerAtStartPic.jpg"&gt;&lt;/p&gt;
&lt;p&gt;Each worker creates a epoll data structure with the kernel (using &lt;code&gt;epoll_create&lt;/code&gt;). It then registers the listen socket descriptor to it using &lt;code&gt;epoll_ctl&lt;/code&gt; and asks the kernel to let it know if there are any events (read or write) on the listen socket(s). All the different workers have access to the listen socket and they concurrently share the requests coming to them. Eventually if the worker has no other work to do it would block using &lt;code&gt;epoll_wait&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Each of the workers also create non-blocking connection sockets to upstream servers so that they can act as proxies to them. This also is event based and hence based on epoll.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Syscalls made by worker at startup" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/nginx-WorkerAtStart.png"&gt;&lt;/p&gt;
&lt;h2 id="nginx-processing-requests"&gt;&lt;a href="#nginx-processing-requests" class="header-anchor"&gt;&lt;/a&gt;Nginx processing requests
&lt;/h2&gt;&lt;p&gt;Now that nginx has started, it is time to process requests.&lt;/p&gt;
&lt;h3 id="the-master-time-to-sleep"&gt;&lt;a href="#the-master-time-to-sleep" class="header-anchor"&gt;&lt;/a&gt;The Master (time to sleep)
&lt;/h3&gt;&lt;p&gt;At this point the master pretty much does nothing. It does not have any work to do during the time of processing requests.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Syscalls made by master on getting load/user requests" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/nginx-MasterOnLoad.png"&gt;&lt;/p&gt;
&lt;h3 id="the-worker-a-superstar"&gt;&lt;a href="#the-worker-a-superstar" class="header-anchor"&gt;&lt;/a&gt;The Worker (A superstar)
&lt;/h3&gt;&lt;p&gt;&lt;img alt="Worker at work" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/nginx-WorkerAtWork.jpg"&gt;&lt;/p&gt;
&lt;p&gt;When a new client connection request comes to the listen socket, the linux kernel will pick the latest added worker process among epoll those waiting in the listen queue and send an event.&lt;/p&gt;
&lt;p&gt;This worker process would then do a non-blocking &lt;code&gt;accept&lt;/code&gt; call which will create a connection socket between the client and server. This connection is now going to be served by this worker process. The worker does the same thing with the connection socket as it did with the listen socket. It registers interest on IO events happening on that socket through epoll_ctl and waits for events with &lt;code&gt;epoll_wait&lt;/code&gt; if it has no other work to do.&lt;/p&gt;
&lt;p&gt;Over a period of time you will find that a worker process ends up serving many connections at the same time. Each of these connections are registered within their (worker&amp;rsquo;s) own epoll data structure. At the end of epoll_wait, the worker might get multiple sockets which are ready for processing. It then processes each of those requests. Processing of incoming request might include acting as a reverse proxy (write out the request to upstream server), do ssl termination etc. On the other hand processing of the response could be compressing the response read from the up stream server (again this is event based using epoll), and write out the response to the client again in non-blocking fashion. The worker is the one which exhibits all the wonderful features of nginx.&lt;/p&gt;
&lt;p&gt;The worker processes do not use epoll based asynchronous IO for files. For files it does blocking IO in most cases. If AIO is well supported in a platform it might use the same. But generally file IO slowness can lead to blocking behavior in the worker (and hence nginx).&lt;/p&gt;
&lt;p&gt;&lt;img alt="Syscalls made by worker on load" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/nginx-WorkerOnLoad.png"&gt;&lt;/p&gt;
&lt;h4 id="see-the-worker-in-action"&gt;&lt;a href="#see-the-worker-in-action" class="header-anchor"&gt;&lt;/a&gt;See the worker in action
&lt;/h4&gt;&lt;p&gt;Do you want to see the workers in action? Go ahead and watch the connections using the following command:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::shell
watch -n 1 &amp;quot;sudo netstat -npt | grep :80&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With that watch running go ahead and hit your nginx server using &lt;code&gt;ab&lt;/code&gt; or something similar. You should see the connections swelling up. Of course I have assumed here that the port nginx is listening to is 80. Change it according to your setup.&lt;/p&gt;
&lt;h2 id="what-is-all-this-fuss-about"&gt;&lt;a href="#what-is-all-this-fuss-about" class="header-anchor"&gt;&lt;/a&gt;What is all this fuss about!
&lt;/h2&gt;&lt;p&gt;Nginx does all this to provide high scalability.&lt;/p&gt;
&lt;h3 id="the-workers-power"&gt;&lt;a href="#the-workers-power" class="header-anchor"&gt;&lt;/a&gt;The worker&amp;rsquo;s power
&lt;/h3&gt;&lt;p&gt;A nginx worker can process 1000s of connections at the same time because of its non-blocking event based nature. Because of this nature, the cost per new connection in nginx is a matter of space for a new file descriptor and data structures needed to manage that socket&amp;rsquo;s information. This is unlike other servers which have a process driven architecture (apache) which needs to allocate much more memory due to creation of process (stack and heap).&lt;/p&gt;
&lt;p&gt;Also the creation of limited number of worker processes in nginx means they can remain pinned to the cpu cores and avoid excessive context switching.&lt;/p&gt;
&lt;h3 id="but-then-it-is-not-all-roses"&gt;&lt;a href="#but-then-it-is-not-all-roses" class="header-anchor"&gt;&lt;/a&gt;But then it is not all roses
&lt;/h3&gt;&lt;p&gt;Earlier I mentioned that the linux kernel keeps picking up the latest added process to distribute connection requests coming into the listen sockets, it happens that one of the workers get the lion share of the work load and hence the multi-core usage becomes skewed - more on one process. You will find more information in one of the articles in the references section.&lt;/p&gt;
&lt;h3 id="the-master-strikes-back"&gt;&lt;a href="#the-master-strikes-back" class="header-anchor"&gt;&lt;/a&gt;The master strikes back.
&lt;/h3&gt;&lt;p&gt;From the above it looks like the &lt;em&gt;worker&lt;/em&gt; is the only star and master is just sleeping. But the sleeping giant plays an important role in keeping nginx running when reloading configuration changes or even doing a nginx binary upgrade. You can find out more about this in the articles in references.&lt;/p&gt;
&lt;h2 id="conclusion"&gt;&lt;a href="#conclusion" class="header-anchor"&gt;&lt;/a&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;As I said earlier, what I have tried here is to give an overview of how nginx goes about serving its clients at a slightly more detail level. I have used the following references as a way to understand most of this. And of course I might have got some of the connecting pieces wrong. If anybody can find these gaps please chime in. Thanks for being here!&lt;/p&gt;
&lt;h2 id="references"&gt;&lt;a href="#references" class="header-anchor"&gt;&lt;/a&gt;References
&lt;/h2&gt;&lt;ol&gt;
&lt;li&gt;&lt;a class="link" href="https://www.nginx.com/blog/inside-nginx-how-we-designed-for-performance-scale/" target="_blank" rel="noopener"
 &gt;Inside NGINX: How We Designed for Performance &amp;amp; Scale&lt;/a&gt; - Gives a good idea on Nginx architecture. Also covers how the master is able to handle config changes or binary upgrades without downtime.&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.netguru.co/codestories/nginx-tutorial-basics-concepts" target="_blank" rel="noopener"
 &gt;Nginx Tutorial #1: Basic Concepts&lt;/a&gt; - Just basic idea on running nginx and some basic configuration&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="http://www.aosabook.org/en/nginx.html" target="_blank" rel="noopener"
 &gt;nginx&lt;/a&gt; - A deep dive on nginx architecture by one of nginx architects&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://www.nginx.com/blog/tuning-nginx/" target="_blank" rel="noopener"
 &gt;Tuning NGINX for Performance&lt;/a&gt; - Gives you ideas for improving nginx performance&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://developer.ibm.com/articles/au-tcpsystemcalls/" target="_blank" rel="noopener"
 &gt;Know your TCP system call sequences&lt;/a&gt; - A general article covering system calls related to TCP connection creation and management. Covers listen backlog too.&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://blog.cloudflare.com/the-sad-state-of-linux-socket-balancing/" target="_blank" rel="noopener"
 &gt;Why does one NGINX worker take all the load?&lt;/a&gt; - This article talks about how it happens that one nginx worker ends up getting a lot more load than others and what you can potentially do about it.&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://medium.com/@copyconstruct/the-method-to-epolls-madness-d9d2d6378642" target="_blank" rel="noopener"
 &gt;The method to epoll’s madness&lt;/a&gt; - A good article on how epoll works.&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://web.archive.org/web/20191015024656/https://forum.nginx.org/read.php?2,194884,194884" target="_blank" rel="noopener"
 &gt;Does Nginx block on file IO?&lt;/a&gt; - A discussion thread on how nginx file reading works.&lt;/li&gt;
&lt;li&gt;&lt;a class="link" href="https://sysdig.com/" target="_blank" rel="noopener"
 &gt;Sysdig&lt;/a&gt; - This is what I used for determining those sys calls that were happening on each of the processes under different conditions.&lt;/li&gt;
&lt;/ol&gt;</description></item><item><title>Thou shall listen to Podcasts - Part II</title><link>https://www.nacnez.com/thou-shall-listen-to-podcasts-part-2.html</link><pubDate>Mon, 04 May 2015 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/thou-shall-listen-to-podcasts-part-2.html</guid><description>&lt;p&gt;Ok. I did say that I will bring the next installment quickly (you can find the &lt;a class="link" href="https://www.nacnez.com/thou-shall-listen-to-podcasts-part-1.html" &gt;previous one here&lt;/a&gt;) But my life and me got in the way. But, better late than never.&lt;/p&gt;
&lt;h3 id="podcasts-set-2---the-software-developers-topper-list"&gt;&lt;a href="#podcasts-set-2---the-software-developers-topper-list" class="header-anchor"&gt;&lt;/a&gt;Podcasts Set 2 - The Software Developer&amp;rsquo;s Topper List
&lt;/h3&gt;&lt;p&gt;This set of podcasts are focused on software development, open source software and technology related. I listen to a good number of such shows and in this installment I am going to share my top three picks. Hopefully I will follow up with more!&lt;/p&gt;
&lt;h4 id="software-engineering-radio"&gt;&lt;a href="#software-engineering-radio" class="header-anchor"&gt;&lt;/a&gt;Software Engineering Radio
&lt;/h4&gt;&lt;img src="https://www.se-radio.net/wp-content/uploads/2014/10/se-radio-logo.png" alt="Software Engineering Radio Logo" style="float:right; width:40%; margin-left:16px"&gt;
&lt;p&gt;&lt;a class="link" href="http://www.se-radio.net/" target="_blank" rel="noopener"
 &gt;Software Engineering Radio&lt;/a&gt;, as the name suggests, is focused on Software engineering. I would say it is a must listen for professional developers. The topics covered vary from software engineering related topics - agile, continuous delivery, architecture related and open source frameworks. The discussion is very technical in nature (some of the most technical discussions I have heard on a podcast) but it still tries to give the listener a good overview of the subject. The discussions are reasonably long (around 45 - 60 minutes), so there is time to explore the topic to some extent. The guests are mostly leaders in the field and/or head honchos of the open source projects that is being discussed. The hosts are a team of developers themselves (some of them very renowned in their own right) and help the steer the discussion so that it is developer focused.&lt;/p&gt;
&lt;p&gt;Some of the recent topics I have listened to are Apache Storm, Continuous Delivery, Logging infrastructure, CQRS, Kafka etc. Recently these shows have become more frequent as well (hope it stays that way). If you are a developer and want to try podcast listening, this one is something you would want to start with.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="http://feeds.feedburner.com/se-radio" target="_blank" rel="noopener"
 &gt;&lt;img alt="rss feed link of SE Radio" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/rss-icon.gif"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id="the-cloudcast"&gt;&lt;a href="#the-cloudcast" class="header-anchor"&gt;&lt;/a&gt;The Cloudcast
&lt;/h4&gt;&lt;p&gt;&lt;a class="link" href="http://www.thecloudcast.net/" target="_blank" rel="noopener"
 &gt;The Cloudcast&lt;/a&gt; started as a cloud technologies podcast. At that time, lots of coverage used to be on Cloud platform vendors and products out there. But close to an year back, they have started focusing a lot on open source projects on cloud and distributed computing and devops related topics. These podcasts are generally short and to the point. The hosts try not get into a lot of depth but try to get the guests to provide high level but useful information and more importantly trends. Recently they have added byte sized versions of the podcast which provide very short introductions of dev and devops topics. You might find those specific ones either useful or trivial.&lt;/p&gt;
&lt;p&gt;I primarily find the podcast discussions providing me a lot of breadth of knowledge in the space. The hosts are really good too. Brian is very sharp and to the point. Aaron on the other hand brings more fun and cheer. Overall a very good podcast to listen to for the topics they cover.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="http://www.buzzsprout.com/3195.rss" target="_blank" rel="noopener"
 &gt;&lt;img alt="rss feed link of The Cloudcast" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/rss-icon.gif"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id="floss-weekly"&gt;&lt;a href="#floss-weekly" class="header-anchor"&gt;&lt;/a&gt;Floss Weekly
&lt;/h4&gt;&lt;img src="https://elroy.twit.tv/sites/default/files/styles/twit_album_art_600x600/public/images/shows/floss_weekly/album_art/floss2022_albumart_standard_2048.jpg" alt="Floss Weekly Logo" style="float:right; width:30%; margin-left:16px"&gt;
&lt;p&gt;&lt;a class="link" href="http://twit.tv/show/floss-weekly" target="_blank" rel="noopener"
 &gt;Floss Weekly&lt;/a&gt; is a podcast focused on free and open source software. This is one of the oldest shows in the podcasting planet. The nature of projects could vary a lot in this podcast. I have discovered a &lt;a class="link" href="http://synergy-project.org/" target="_blank" rel="noopener"
 &gt;desktop software for controlling multiple computers using a single keyboard and mouse&lt;/a&gt; to a &lt;a class="link" href="https://github.com/ushahidi/Ushahidi_Web" target="_blank" rel="noopener"
 &gt;platform which made Kenyan elections better&lt;/a&gt; through this podcast. It is this variety which draws me to it. The primary criteria of projects participating in it is about them being open source.&lt;/p&gt;
&lt;p&gt;The hosts don&amp;rsquo;t get as technical as the other two shows (except for Randal at times), but the show provides a well rounded overview of the project. There is considerable discussion on open source licensing and governance which I don&amp;rsquo;t find in other shows. And that is something I like to get exposed to. So if you are into open source in general and like variety, this is a good podcast to listen to.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="http://feeds.twit.tv/floss.xml" target="_blank" rel="noopener"
 &gt;&lt;img alt="rss feed link of Floss Weekly" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/rss-icon.gif"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Done! This is a short one. The top three are out, but there is more to come. I will get them out sooner than later.&lt;/p&gt;</description></item><item><title>Thou shall listen to Podcasts - Part I</title><link>https://www.nacnez.com/thou-shall-listen-to-podcasts-part-1.html</link><pubDate>Sat, 31 Jan 2015 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/thou-shall-listen-to-podcasts-part-1.html</guid><description>&lt;p&gt;I listen to a lot of podcasts. I really can&amp;rsquo;t remember how it started but getting my smart phone (about 4 years back) is what triggered it. I have listened to a lot of them and found them useful, entertaining, informative and fun. Some of these podcasters even feel like long time friends. Ok, that might be pushing it, but at times I do feel a sort of allegiance and loyalty to them.&lt;/p&gt;
&lt;p&gt;&lt;img alt="Podcasts" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/podcast.jpg"&gt;&lt;/p&gt;
&lt;h3 id="why-podcasts"&gt;&lt;a href="#why-podcasts" class="header-anchor"&gt;&lt;/a&gt;Why Podcasts?
&lt;/h3&gt;&lt;p&gt;Objectively, I feel podcasts can act as a good source of information/knowledge which can consumed in a passive manner. I listen to podcasts mostly when I am commuting or exercising (walking!). There are podcasts for almost every topic you can think of. I am primarily focused on technology, software development and startup related podcasts but I know there are a lot more available. While there are podcasts directories which you can use to locate podcasts, I find my podcasts from podcatchers, itunes and from other podcasts (and of course do googling for getting the rss feed link). Most of the podcasts I listen to are produced in the US (wish I could find more from India!!!). That said, they provide a lot of value from my perspective.&lt;/p&gt;
&lt;h3 id="share-the-goodness"&gt;&lt;a href="#share-the-goodness" class="header-anchor"&gt;&lt;/a&gt;Share the goodness
&lt;/h3&gt;&lt;p&gt;Since I find it so useful, I thought it would be good to share them with others. I initially thought of just creating a list of all of them and throw it out there. But somehow I felt that was too vanilla. Then I thought of creating a top 10 list but that felt cheesy initially. When I thought more about it and I felt it might be useful for figuring out my own preferences and likings and my ability to judge things. So I attempted to make an objective score for some of the really good podcasts (as per my taste) which I listen to. Only to realize that it is damn difficult to make it objective. So I gave up on that. Finally decided to create a set of subjective groups of podcasts I listen to and share them with you all.&lt;/p&gt;
&lt;h3 id="podcasts-set-1---distinctive-and-fresh"&gt;&lt;a href="#podcasts-set-1---distinctive-and-fresh" class="header-anchor"&gt;&lt;/a&gt;Podcasts Set 1 - Distinctive and Fresh
&lt;/h3&gt;&lt;p&gt;I am starting this series with a set of podcasts which I feel have a very distinctive nature. The content they provide (most times) is perceptive and opens your mind to a lot of different thoughts and ideas. Listening to them makes you think, smile and sometimes be amazed. Let us get on with it.&lt;/p&gt;
&lt;h4 id="spark"&gt;&lt;a href="#spark" class="header-anchor"&gt;&lt;/a&gt;Spark
&lt;/h4&gt;&lt;img src="https://www.nacnez.com/images/podcast/nora_young.jpg" alt="Nora Young who anchors Spark" style="float:right; margin-left:16px"&gt;
&lt;p&gt;&lt;a class="link" href="http://www.cbc.ca/radio/spark" target="_blank" rel="noopener"
 &gt;Spark&lt;/a&gt;, in Nora&amp;rsquo;s words, is a podcast about tech trends and fresh ideas. And I couldn&amp;rsquo;t describe it any better. Nora is the anchor of the show. The podcast is set as a conversation with the listener. Nora makes the listener a part of the journey in which she meets remarkable people and has very deliberate and pleasant conversation with them. These people look at tech in different ways - either to solve problems or just to understand different things. The podcast brings innovative stories on tech trends and how technology affects people and culture. It brings up simple life hacks and cool new ideas. And it is really produced well (it is &lt;a class="link" href="http://en.wikipedia.org/wiki/Spark_%28radio_show%29" target="_blank" rel="noopener"
 &gt;a radio show by CBC&lt;/a&gt;). The show is done regularly. The music is done well and it connects the various parts of the show nicely. There is a scent of art and creation in the podcast which appeals to creative spirit in us developers (at least I would like to think that :)). It leaves you with an enriched and fresh feeling most of the times.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="http://www.cbc.ca/podcasting/includes/spark.xml" target="_blank" rel="noopener"
 &gt;&lt;img alt="rss feed link of Spark" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/rss-icon.gif"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="hanselminutes"&gt;&lt;a href="#hanselminutes" class="header-anchor"&gt;&lt;/a&gt;Hanselminutes
&lt;/h4&gt;&lt;img src="https://www.nacnez.com/images/podcast/hansel.jpeg" alt="Scott Hanselman who produces hanselminutes" style="float:right; margin-left:16px"&gt;
&lt;p&gt;&lt;a class="link" href="http://hanselminutes.com/" target="_blank" rel="noopener"
 &gt;Hanselminutes&lt;/a&gt; is a podcast produced by Scott Hanselman. This podcast historically was a .NET developer podcast. But for quite a long time (at least from the time I have been listening), it has not had that focus at all. There are some shows related to .NET for sure. At the same time there are shows on Python, Javascript, Dart, Java etc. as well. Actually forget the programming languages. This guy produces shows on UX, game development, startups, relationships, developer culture, diabetes technologies, iphones etc. Almost anything under the sun - the difference is that he looks at it from an eye of a developer and problem solver. Also, he always will try to NOT make any assumptions on what the listener might know about the topic. He will get the guest to explain the topic without the listener getting lost on jargon speak. The discussion is never long, but whatever is talked would make sense to you and that nugget is something you can carry with you. The way he goes about the discussion is engaging and simple. He does not try to be funny or anything. Just genuine good conversation. The wide variety of topics which he covers makes it very appealing to me. And he is very very regular. So you can expect some interesting conversation every week. Though I have never met him personally, the show sort of makes me feel that I know him somewhat. And he is an open source supporter too!!!&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="http://feeds.podtrac.com/9dPm65vdpLL1" target="_blank" rel="noopener"
 &gt;&lt;img alt="rss feed link of Hanselminutes" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/rss-icon.gif"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4 id="cognicast"&gt;&lt;a href="#cognicast" class="header-anchor"&gt;&lt;/a&gt;Cognicast
&lt;/h4&gt;&lt;img src="https://www.nacnez.com/images/podcast/cognicast.jpeg" alt="Cognicast latest episode cover art" style="float:right; margin-left:16px"&gt;
&lt;p&gt;&lt;a class="link" href="http://blog.cognitect.com/cognicast/" target="_blank" rel="noopener"
 &gt;Cognicast&lt;/a&gt; is a podcast produced by Cognitect and is hosted by Craig Andera. This is relatively new podcast and leans towards Clojure related topics (since Cognitect is Clojure focused - Rich Hickey is the CTO for crying out loud!). Now I am not a Clojure guy at all but I like the functional leanings of the topics. That said, this podcast is also modeled in the lines of hanselminutes. Apart from technical topics, it covers other kinds of topics as well. Craig keeps the conversation nice and cordial. One of the great things he does is that he allows the guest to flow with what they want to talk and get the maximum out of them. He might nudge them a little here and there but allows them to take the limelight almost completely. Very nice and humble all the time. Some of the discussions I have heard have truly blown my mind. That is why even when there are many clojure heavy discussions on the show, I still listen to them since I get at least something out of it. Another novel part of the show is that allows you to sample lots of different music. The show is young but I find it enjoyable, thought provoking and fresh. I hope Craig keeps going that way.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;Update on 3-May-2015&lt;/strong&gt;&lt;/em&gt;: The music sampling part of the show got stopped from this year (2015) onwards.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="http://feeds.feedburner.com/cognicast" target="_blank" rel="noopener"
 &gt;&lt;img alt="rss feed link of Cognicast" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/rss-icon.gif"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;That is the first batch out. The next installment is ready — head over to &lt;a class="link" href="https://www.nacnez.com/thou-shall-listen-to-podcasts-part-2.html" &gt;Part II&lt;/a&gt; for more podcast recommendations.&lt;/p&gt;</description></item><item><title>Journey starts at the Box</title><link>https://www.nacnez.com/my-journey-starts-at-the-box.html</link><pubDate>Sun, 21 Dec 2014 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/my-journey-starts-at-the-box.html</guid><description>&lt;p&gt;I have been spending some of my free time on working on a personal project. As part of that, I needed to figure out how can we show visualizations of my data - yep charting. To give you some background, I am playing with angular js for this application and using a python based backend. Since I wanted to have a dynamic visualization - with animations and interactions thrown around, I decided to use a client side charting library that takes in the data and does the visualization entirely on the browser. Another thing I wanted to do was to see if I could use the same code or parts of it for delivering visualizations to the mobile.&lt;/p&gt;
&lt;h3 id="d3-enters"&gt;&lt;a href="#d3-enters" class="header-anchor"&gt;&lt;/a&gt;D3 Enters
&lt;/h3&gt;&lt;p&gt;Given its immense popularity and its ability to work with svg based visualization (which I felt would work better for supporting multiple devices - of course that may not be true), I gravitated to &lt;a class="link" href="http://d3js.org/" target="_blank" rel="noopener"
 &gt;D3&lt;/a&gt;. I got to the D3 site and I found so many cool looking visualizations that I was just blown away (I bet you will have the same feeling). Of course almost none of them made much sense to me. I wanted to use some simple visualizations like bar charts, line charts etc. and they were of course available on D3.&lt;/p&gt;
&lt;h3 id="but-i-am-building-an-angular-app"&gt;&lt;a href="#but-i-am-building-an-angular-app" class="header-anchor"&gt;&lt;/a&gt;But I am building an Angular app.
&lt;/h3&gt;&lt;p&gt;Also I was lazy. I wanted to figure out if there is a pain less way to get these charts integrated into my angular app. The immediate thought was to figure out if there are any angular directives.&lt;/p&gt;
&lt;h4 id="angular-directives-and-nvd3-to-the-rescue"&gt;&lt;a href="#angular-directives-and-nvd3-to-the-rescue" class="header-anchor"&gt;&lt;/a&gt;Angular Directives and NVD3 to the rescue
&lt;/h4&gt;&lt;p&gt;So I googled it. And lo and behold there was &lt;a class="link" href="https://web.archive.org/web/20140712023248/https://www.dashingd3js.com/d3-resources/d3-and-angular" target="_blank" rel="noopener"
 &gt;an entire page&lt;/a&gt; talking about it. After some digging around I settled on two of them - &lt;a class="link" href="http://krispo.github.io/angular-nvd3/#/" target="_blank" rel="noopener"
 &gt;angular-nvd3&lt;/a&gt; and &lt;a class="link" href="http://cmaurer.github.io/angularjs-nvd3-directives" target="_blank" rel="noopener"
 &gt;angularjs-nvd3-directives&lt;/a&gt;. Both of these directive libraries leverage &lt;a class="link" href="https://github.com/novus/nvd3" target="_blank" rel="noopener"
 &gt;nvd3&lt;/a&gt; underneath which itself was built on d3 (Wow! A layer above a layer above the actual thing). While both of them seemed promising to me, I somehow settled on the second one. I remember my reasons at that time were that I liked the declarative nature of the directive (I am not sure if I like that still) and that it was around for longer time (which I still think is sensible).&lt;/p&gt;
&lt;p&gt;&lt;img alt="nvd3 based bar chart" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/box-journey-bar.png"&gt;&lt;/p&gt;
&lt;p&gt;That was a simple bar chart (look at the various bar colors!!!) and I followed that with a simple line chart&lt;/p&gt;
&lt;p&gt;&lt;img alt="nvd3 based line chart" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/box-journey-line.png"&gt;&lt;/p&gt;
&lt;p&gt;So my immediate needs were taken care and everything was perfect. I cooked up some bar charts, line chart and even some pie charts. I tweaked some colors and axis layout through the directive provided support. All was going well. Of course, in all the tweaking I was doing (colors, date formats), I sometimes needed to get some insight into d3.js itself. But that was very minimal.&lt;/p&gt;
&lt;h3 id="things-change-we-want-more"&gt;&lt;a href="#things-change-we-want-more" class="header-anchor"&gt;&lt;/a&gt;Things change, We want more
&lt;/h3&gt;&lt;p&gt;I had taken a short detour into the &lt;a class="link" href="https://www.coursera.org/course/stats1" target="_blank" rel="noopener"
 &gt;world of statistics&lt;/a&gt; earlier. So I always liked the concepts of median and percentiles. So I wanted to figure out if there is a way to depict that in a visualization. My friend then introduced me to the &lt;a class="link" href="http://en.wikipedia.org/wiki/Box_plot" target="_blank" rel="noopener"
 &gt;box plot&lt;/a&gt;. I won&amp;rsquo;t go into the details of box plot here. There is good reference material on that on the internet.&lt;/p&gt;
&lt;p&gt;So my mind was set on the box plot and I wanted to figure out how I can create a visualization for it. The angularjs-nvd3-directives did not have any support for them. Neither did nvd3. So I looked directly at d3 and there was &lt;a class="link" href="http://bl.ocks.org/mbostock/4061502" target="_blank" rel="noopener"
 &gt;an example&lt;/a&gt; and the associated &lt;a class="link" href="https://github.com/d3/d3-plugins/tree/master/box" target="_blank" rel="noopener"
 &gt;plug-in code&lt;/a&gt; available for it.&lt;/p&gt;
&lt;p&gt;My idea of living on top of the abstraction (actually an abstraction over abstraction) no longer worked. I had no choice.&lt;/p&gt;
&lt;h3 id="getting-my-feet-wet-into-d3"&gt;&lt;a href="#getting-my-feet-wet-into-d3" class="header-anchor"&gt;&lt;/a&gt;Getting my feet wet into D3
&lt;/h3&gt;&lt;p&gt;I initially thought I would try to create a nvd3 based box plot but I realized that it is going to take a lot of time figuring out nvd3 when I did not even know much about d3.&lt;/p&gt;
&lt;p&gt;So I tried to figure out some basic concepts of d3 so that I understand the plug-in code. First and foremost I understood the concept of selection and mapping the selection with data. Also got an understanding of scales. This helped me understand the plug-in code. But that was not enough. I needed to figure out how I can integrate d3 with my angular app. Again there was example readily &lt;a class="link" href="http://bl.ocks.org/biovisualize/5372077" target="_blank" rel="noopener"
 &gt;available&lt;/a&gt;. A simple directive would do the trick and I created a box plot using the same.&lt;/p&gt;
&lt;h3 id="tweaking-the-box-plot"&gt;&lt;a href="#tweaking-the-box-plot" class="header-anchor"&gt;&lt;/a&gt;Tweaking the box plot
&lt;/h3&gt;&lt;p&gt;I started getting interested in the box plot code itself. First thing I realized was that the box plot code in its current form (inside the plug-in) took a lot of horizontal space as you increase the number of plots. This may not work very well when you don&amp;rsquo;t have a lot horizontal space (read mobile device). So I figured I needed to tweak the box plot to support a change in orientation.&lt;/p&gt;
&lt;p&gt;The second thing I wanted to do was to figure out a way to show labels close to my plots to indicate what they are plotting.&lt;/p&gt;
&lt;p&gt;Another thing I noticed was that the outliers plotted by the box plot could skew up your graph quite a lot if you have really high outlier values. So I felt it would be good to have a way to turn it off. That is another thing I wanted to tweak.&lt;/p&gt;
&lt;p&gt;And that is what I did. You can find &lt;a class="link" href="http://embed.plnkr.co/7RVMhw/" target="_blank" rel="noopener"
 &gt;my code in plunker&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img alt="box plot visual from plnkr" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/box-journey-plnkr-box.png"&gt;&lt;/p&gt;
&lt;h3 id="the-road-forward"&gt;&lt;a href="#the-road-forward" class="header-anchor"&gt;&lt;/a&gt;The Road forward
&lt;/h3&gt;&lt;p&gt;The plnkr code is still not the cleanest. I have done some ugly hacks to make it look reasonable. It is available publicly. If anybody wants to tweak it and make it better (and teach me in the process), that would be fantastic. Also, I have still not been able to make my changed box plot work with my angular directive reliably. That is something I would surely like to fix. If I do I will share that code.&lt;/p&gt;
&lt;p&gt;On the library side, I want to figure out if I can find a better abstraction over d3 which is simple to use. d3 is good but it is very literal and low level in its nature (which is by design from what I understand and hence gives it a lot of power to do new things!). I don&amp;rsquo;t know whether nvd3 is that abstraction. May be it is and I will find out more about it. There seem to be other &lt;a class="link" href="http://trifacta.github.io/vega/" target="_blank" rel="noopener"
 &gt;alternatives&lt;/a&gt; as well. Also for the mobile, I am not sure whether the d3 way would be the best fit - I somehow do not feel so (anybody can correct me!!!).&lt;/p&gt;
&lt;p&gt;Libraries aside, I feel visualization is a field to really get a good handle on. To use a cliche - A picture is 1000 times better than words (or was it a picture is better than 1000 words&amp;hellip; either way) - good visualization can be very powerful. I think a more deeper study on visualization will be very useful to me. Hopefully I can go down that path and do something worthwhile!&lt;/p&gt;</description></item><item><title>Python can be weird!</title><link>https://www.nacnez.com/python-can-be-weird.html</link><pubDate>Sun, 16 Nov 2014 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/python-can-be-weird.html</guid><description>&lt;p&gt;For a long time, I have been focused on &lt;em&gt;Java&lt;/em&gt; as my primary development language (and platform) for both my work and any of my small personal projects. But I have been playing with &lt;em&gt;Python&lt;/em&gt; for more than 6 months now. The reason I picked Python, is a discussion for another day. Currently I want to focus on couple of things which I found to be weird with Python.&lt;/p&gt;
&lt;p&gt;Before I get into that, let me make myself clear. My relationship with Python is very young and my perspective comes from a long time Java exposure and a limited exposure to other languages (read &lt;em&gt;Javascript&lt;/em&gt; and very very little bit of &lt;em&gt;Haskell&lt;/em&gt;). Also, within this short time with Python, I find the language as a breath of fresh air. I find it to be much more concise than what I am used to (think &lt;em&gt;Java&lt;/em&gt;). It is really powerful. I am getting a taste of it&amp;rsquo;s dynamic nature as well. These qualities of Python are well known to all and I will probably write about my impressions on specific features sometime down the line. But today I wanted to focus on couple of specific language features I found to be slightly weird in their working.&lt;/p&gt;
&lt;h3 id="augmented-assignment"&gt;&lt;a href="#augmented-assignment" class="header-anchor"&gt;&lt;/a&gt;Augmented Assignment
&lt;/h3&gt;&lt;p&gt;The term might sound a bit fancy (that is what I felt when I read it), but the construct is pretty simple and probably known to all programmers (of almost any language).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
a = 0
a += 1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You must have spotted the augmented assignment operator! Yep, it is &lt;code&gt;+=&lt;/code&gt; . Of course there are other similar ones like &lt;code&gt;-=&lt;/code&gt; , &lt;code&gt;*=&lt;/code&gt; etc. The form &lt;code&gt;a += 1&lt;/code&gt; is generally a shortcut of &lt;code&gt;a = a + 1&lt;/code&gt; . In Python also it works the same way. At least that is what I thought.&lt;/p&gt;
&lt;p&gt;Let us try using the augmented assignment operator with list concatenation:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
&amp;gt;&amp;gt;&amp;gt; A = [1,2,3,4]
&amp;gt;&amp;gt;&amp;gt; B = [5,6,7]
&amp;gt;&amp;gt;&amp;gt; A = A + B
&amp;gt;&amp;gt;&amp;gt; A
[1, 2, 3, 4, 5, 6, 7]
&amp;gt;&amp;gt;&amp;gt; A = [1,2,3,4]
&amp;gt;&amp;gt;&amp;gt; B = [5,6,7]
&amp;gt;&amp;gt;&amp;gt; A += B
&amp;gt;&amp;gt;&amp;gt; A
[1, 2, 3, 4, 5, 6, 7]
&amp;gt;&amp;gt;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That works as expected. So I should be able to reliably use the augmented assignment operator instead of the longer form. Let us try something else now.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
&amp;gt;&amp;gt;&amp;gt; A = [1,2,3,4]
&amp;gt;&amp;gt;&amp;gt; B = [5,6,7]
&amp;gt;&amp;gt;&amp;gt; C = A # Why am I doing this? Wait for it.
&amp;gt;&amp;gt;&amp;gt; A = A + B
&amp;gt;&amp;gt;&amp;gt; A
[1, 2, 3, 4, 5, 6, 7]
&amp;gt;&amp;gt;&amp;gt; C
[1, 2, 3, 4]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This makes sense to me. The concatenation operator &lt;code&gt;+&lt;/code&gt; creates a new object and assigns to A. And &amp;lsquo;C&amp;rsquo; keeps pointing to the older object. This is all good and working as expected. Let us change the above using the augmented assignment operator instead.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
&amp;gt;&amp;gt;&amp;gt; A = [1,2,3,4]
&amp;gt;&amp;gt;&amp;gt; B = [5,6,7]
&amp;gt;&amp;gt;&amp;gt; C = A
&amp;gt;&amp;gt;&amp;gt; A += B # Here I have used the augmented assignment version
&amp;gt;&amp;gt;&amp;gt; A
[1, 2, 3, 4, 5, 6, 7]
&amp;gt;&amp;gt;&amp;gt; C
[1, 2, 3, 4, 5, 6, 7]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;????####!!!!. What happened here? Something happened. How did it change? What did I change? The only change I made from the previous listing is that I used augmented assignment. But that changed how things work. Concatenation no longer creates a new object. It mutates the assigned object in place!!!!&lt;/p&gt;
&lt;p&gt;That is weird to me! I figured that it is Python trying to optimize since the list is a mutable object in Python. But somehow it feels unclean, because it seems to break a promise. To a long term Python programmer, this may not be weird at all. But to me, it felt out of character to how generally Python works - predictable and explicit. It might just be my own (mis)interpretation, but it feels weird.&lt;/p&gt;
&lt;h3 id="boolean-operations"&gt;&lt;a href="#boolean-operations" class="header-anchor"&gt;&lt;/a&gt;Boolean Operations
&lt;/h3&gt;&lt;p&gt;I am referring to the &lt;code&gt;and&lt;/code&gt; and &lt;code&gt;or&lt;/code&gt; operators. In Python they mean exactly what they say. The &lt;code&gt;and&lt;/code&gt; refers to &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; (conjunction) in other languages like Java and &lt;code&gt;or&lt;/code&gt; refers to &lt;code&gt;||&lt;/code&gt; (disjunction) in other languages. In most other languages, using these operators leads to boolean results. By not in Python! These operators return one of the objects which is an outcome of the corresponding expression. One of the underlying principles behind this is Python&amp;rsquo;s concept of truth values. Let me illustrate this with some examples:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
&amp;gt;&amp;gt;&amp;gt; &amp;quot;&amp;quot; and 23
''
&amp;gt;&amp;gt;&amp;gt; &amp;quot;add&amp;quot; and &amp;quot;subtract&amp;quot;
'subtract'
&amp;gt;&amp;gt;&amp;gt; &amp;quot;&amp;quot; or 23
23
&amp;gt;&amp;gt;&amp;gt; &amp;quot;add&amp;quot; or &amp;quot;subtract&amp;quot;
'add'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In all these examples, you see that &lt;code&gt;and&lt;/code&gt; and &lt;code&gt;or&lt;/code&gt; are not returning any booleans. They work based on truth value concepts of Python and return the objects involved as per the truth value rules. Let us see its usage below:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
&amp;gt;&amp;gt;&amp;gt; def calc_simple_interest(principal, rate, tenure):
... p = principal if principal else 0
... r = rate if rate else 10
... t = tenure if tenure else 5
... print(&amp;quot;Returning interest for %d at %d percent for %d years&amp;quot; % (p,r,t))
... return p * (r/100) * t
...
&amp;gt;&amp;gt;&amp;gt; calc_simple_interest(1000,5,3)
Returning interest for 1000 at 5 percent for 3 years
150.0
&amp;gt;&amp;gt;&amp;gt; calc_simple_interest(1000,0,0)
Returning interest for 1000 at 10 percent for 5 years
500.0
&amp;gt;&amp;gt;&amp;gt; calc_simple_interest(1000,8,0)
Returning interest for 1000 at 8 percent for 5 years
400.0
&amp;gt;&amp;gt;&amp;gt; calc_simple_interest(1000,8,None)
Returning interest for 1000 at 8 percent for 5 years
400.0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The above example is a convoluted and contrived way to handle default values (since Python has function argument defaults). But to somebody reading through that code, it still makes reasonable sense. Now let me change it.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:::python
&amp;gt;&amp;gt;&amp;gt; def calc_simple_interest(principal, rate, tenure):
... p = principal or 0
... r = rate or 10
... t = tenure or 5
... print(&amp;quot;Returning interest for %d at %d percent for %d years&amp;quot; % (p,r,t))
... return p * (r/100) * t
...
&amp;gt;&amp;gt;&amp;gt; calc_simple_interest(1000,5,3)
Returning interest for 1000 at 5 percent for 3 years
150.0
&amp;gt;&amp;gt;&amp;gt; calc_simple_interest(1000,0,0)
Returning interest for 1000 at 10 percent for 5 years
500.0
&amp;gt;&amp;gt;&amp;gt; calc_simple_interest(1000,8,0)
Returning interest for 1000 at 8 percent for 5 years
400.0
&amp;gt;&amp;gt;&amp;gt; calc_simple_interest(1000,8,None)
Returning interest for 1000 at 8 percent for 5 years
400.0
&amp;gt;&amp;gt;&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Now that is Python&amp;rsquo;s &lt;code&gt;or&lt;/code&gt; operator working its way to give us the exact same behavior as the &lt;em&gt;&amp;rsquo;ternary if&amp;rsquo;&lt;/em&gt; used before.&lt;/p&gt;
&lt;p&gt;The way the logical operators work in Python felt weird to me. But I did not feel very unclean about it like the last one. It just was different.&lt;/p&gt;
&lt;h3 id="in-closing"&gt;&lt;a href="#in-closing" class="header-anchor"&gt;&lt;/a&gt;In Closing
&lt;/h3&gt;&lt;p&gt;These are two cases where I felt Python to be slightly weird in its ways. There might be others and may be I will find them down the line (and I will share them if I do).&lt;/p&gt;
&lt;p&gt;Though I have highlighted what I felt weird about Python, it does not mean that I don&amp;rsquo;t like the language. On the contrary, I actually like it quite a lot. But just like anything/anybody who you like/love a lot has some small imperfections, so does Python. In fact, it is those imperfections which make them unique and differentiated to us. That is what this does to Python too.&lt;/p&gt;</description></item><item><title>Bye! Google Sites, Hello! Github pages</title><link>https://www.nacnez.com/move-to-github-pages-and-pelican.html</link><pubDate>Tue, 04 Nov 2014 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/move-to-github-pages-and-pelican.html</guid><description>&lt;p&gt;For close to 2 years (the time since I got the domain), I had married myself to &lt;a class="link" href="http://en.wikipedia.org/wiki/Google_Sites" target="_blank" rel="noopener"
 &gt;Google sites&lt;/a&gt; for my own blog and site. It was not a happy marriage. While it might have worked for others, the inherent inability to change anything or use any of the good tools out there, for my content creation did not give me any comfort. I tried hard to use what is provided and finally gave up. I decided that, may be having my own site is really not worth it.&lt;/p&gt;
&lt;h4 id="github-pages"&gt;&lt;a href="#github-pages" class="header-anchor"&gt;&lt;/a&gt;&lt;a class="link" href="https://pages.github.com" target="_blank" rel="noopener"
 &gt;Github Pages&lt;/a&gt;
&lt;/h4&gt;&lt;p&gt;For sometime, I have been hearing about &lt;a class="link" href="https://pages.github.com" target="_blank" rel="noopener"
 &gt;Github pages&lt;/a&gt;, but never thought too much about it. Then I got chatting with &lt;a class="link" href="http://www.undefinednull.com" target="_blank" rel="noopener"
 &gt;one of my friends&lt;/a&gt; and he talked about using Github pages with &lt;a class="link" href="http://octopress.org" target="_blank" rel="noopener"
 &gt;Octopress&lt;/a&gt; as the content management system for his blog. This really piqued my interest and I decided that I would give it a go.&lt;/p&gt;
&lt;p&gt;So I went through the documentation of &lt;a class="link" href="https://pages.github.com" target="_blank" rel="noopener"
 &gt;&lt;em&gt;github pages&lt;/em&gt;&lt;/a&gt; and figured out how to create a user site and put a place holder page in it.&lt;/p&gt;
&lt;p&gt;&lt;img alt="My placeholder page" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/placeholder_page.png"&gt;&lt;/p&gt;
&lt;p&gt;It was not great but it was a start. I used &lt;a class="link" href="http://getbootstrap.com" target="_blank" rel="noopener"
 &gt;bootstrap&lt;/a&gt; for the css and used some basic elements on the page.&lt;/p&gt;
&lt;p&gt;I also made my domain point to it. It took a day (may be two) for the dns records to get updated and viola! my new site was up. I had finally broken the shackles and escaped from the tyranny of Google sites. My new journey had begun.&lt;/p&gt;
&lt;h4 id="pelican"&gt;&lt;a href="#pelican" class="header-anchor"&gt;&lt;/a&gt;&lt;a class="link" href="http://blog.getpelican.com" target="_blank" rel="noopener"
 &gt;Pelican&lt;/a&gt;
&lt;/h4&gt;&lt;p&gt;Now my friend had talked about using &lt;a class="link" href="http://octopress.org" target="_blank" rel="noopener"
 &gt;octopress&lt;/a&gt; for his blog. I felt that using a static file based content management system was surely a good idea but I wanted to use a python based one instead of a ruby one. A quick search lead me to &lt;a class="link" href="http://blog.getpelican.com" target="_blank" rel="noopener"
 &gt;Pelican&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a class="link" href="http://blog.getpelican.com" target="_blank" rel="noopener"
 &gt;Pelican&lt;/a&gt; seemed to fit my bill. I could use &lt;a class="link" href="http://daringfireball.net/projects/markdown/" target="_blank" rel="noopener"
 &gt;markdown&lt;/a&gt; (which was another thing I meant to learn) to get my content. Pelican &lt;a class="link" href="http://docs.getpelican.com/en/3.4.0/" target="_blank" rel="noopener"
 &gt;documentation&lt;/a&gt; looked pretty good and it was easy to get started. There was a good amount of configurability in Pelican. Also there was support for themes and plugins (which is python based and that looks interesting to me). The available collection of ready made themes seemed reasonable and I picked the bootstrap 3 based one called &lt;a class="link" href="https://github.com/DandyDev/pelican-bootstrap3" target="_blank" rel="noopener"
 &gt;pelican-bootstrap3&lt;/a&gt; from &lt;a class="link" href="http://dandydev.net/" target="_blank" rel="noopener"
 &gt;Daan&lt;/a&gt;. This post is written on this base setup. I am still to add any plugins to the site but that can wait.&lt;/p&gt;
&lt;p&gt;I wanted to get started. And now I have!&lt;/p&gt;</description></item><item><title>Setting up a nginx virtual host on Ubuntu</title><link>https://www.nacnez.com/nginx-ubuntu.html</link><pubDate>Tue, 03 Jul 2012 00:00:00 +0000</pubDate><guid>https://www.nacnez.com/nginx-ubuntu.html</guid><description>&lt;p&gt;I had heard of &lt;a class="link" href="http://www.nginx.org/" target="_blank" rel="noopener"
 &gt;nginx&lt;/a&gt; as a very good web server from the perspective of performance. So I decided to try it out for one of my learning endeavors.&lt;/p&gt;
&lt;h2 id="installation"&gt;&lt;a href="#installation" class="header-anchor"&gt;&lt;/a&gt;Installation
&lt;/h2&gt;&lt;p&gt;Installation of nginx on my &lt;a class="link" href="http://www.ubuntu.com/" target="_blank" rel="noopener"
 &gt;Ubuntu&lt;/a&gt; was a breeze. Nginx is available as part of the Ubuntu distribution from Canonical. So I could just search the &lt;a class="link" href="http://en.wikipedia.org/wiki/Ubuntu_Software_Center" target="_blank" rel="noopener"
 &gt;Ubuntu Software Center&lt;/a&gt; and install it on my machine. Once installed, starting and stopping the nginx server is simple. Just open the &lt;a class="link" href="https://help.ubuntu.com/community/UsingTheTerminal" target="_blank" rel="noopener"
 &gt;terminal&lt;/a&gt;, and use the following commands&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;sudo nginx&lt;/code&gt; (starts the server)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo nginx -s quit&lt;/code&gt; (stops the server)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;sudo nginx -h&lt;/code&gt; (provides basic usage help)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One thing to notice is that you have to execute these commands with superuser privileges (sudo).&lt;/p&gt;
&lt;h2 id="setting-up-the-virtual-host"&gt;&lt;a href="#setting-up-the-virtual-host" class="header-anchor"&gt;&lt;/a&gt;Setting up the virtual host
&lt;/h2&gt;&lt;p&gt;Being able to run the nginx server is all good. But for me to use it, I needed a virtual host where I can put my development site&amp;rsquo;s content.&lt;/p&gt;
&lt;p&gt;Using the &lt;a class="link" href="http://www.google.co.in/" target="_blank" rel="noopener"
 &gt;readily available and trusted resource&lt;/a&gt;, I reached a &lt;a class="link" href="https://web.archive.org/web/20120706001842/http://articles.slicehost.com/2008/5/16/ubuntu-hardy-nginx-virtual-hosts" target="_blank" rel="noopener"
 &gt;link&lt;/a&gt; which talked about this. After reading the same and some experimentation, I was able to set the virtual host. Below is a brief description of the steps which I followed:&lt;/p&gt;
&lt;h3 id="folder-structure"&gt;&lt;a href="#folder-structure" class="header-anchor"&gt;&lt;/a&gt;Folder Structure
&lt;/h3&gt;&lt;p&gt;Once nginx is set up, you find the following folder where definitions of the virtual hosts are kept:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/etc/nginx/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The folder structure is as depicted below:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Nginx folder structure" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/nginx-folders1.png"&gt;&lt;/p&gt;
&lt;p&gt;The important folders for our discussion are &lt;code&gt;sites-available&lt;/code&gt; and &lt;code&gt;sites-enabled&lt;/code&gt;. For all sites which are to be hosted by nginx inside the current machine, an entry needs to be made inside the &lt;code&gt;sites-available&lt;/code&gt; folder.  A file needs to be created which holds the configuration and the name of file is the domain name. For example, I can create a file - &lt;code&gt;ex.nacnez.com&lt;/code&gt; which represents the domain name using which the virtual host can be accessed. The contents of the configuration file are as follows (remember this is just the basic stuff - more configuration is possible but for setting up the virtual host this is good enough):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;server {
 listen   80;
 server_name example.nacnez.com;
 access_log  /home/your/docroot/basepath/ex.nacnez.com/log/access.log;
 error_log  /home/your/docroot/basepath/ex.nacnez.com/log/error.log;
 location / {
 root   /home/your/docroot/basepath/ex.nacnez.com/public/;
 index  index.html;
 }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Here &lt;code&gt;/home/your/docroot/basepath&lt;/code&gt; means the base path under which you want to store your site and its document root folders.&lt;/p&gt;
&lt;h3 id="setting-up-the-actual-document-root"&gt;&lt;a href="#setting-up-the-actual-document-root" class="header-anchor"&gt;&lt;/a&gt;Setting up the actual document root
&lt;/h3&gt;&lt;p&gt;The contents of your site is generally placed under its document root folder.&lt;/p&gt;
&lt;p&gt;&lt;img alt="nginx docroot folders" loading="lazy" sizes="(max-width: 767px) calc(100vw - 30px), (max-width: 1023px) 700px, (max-width: 1279px) 950px, 1232px" src="https://www.nacnez.com/images/nginx-docroot-folders.png"&gt;&lt;/p&gt;
&lt;p&gt;If you look at the configuration above you can understand where the document root of your site is placed. Under the &lt;code&gt;public&lt;/code&gt; folder is where your index file (&lt;code&gt;index.html&lt;/code&gt; as per the above configuration and which could contain any HTML content) and other website artifacts go. Anybody accessing your web server through the above domain (of course there is more work to be done for that) is taken to this folder. The log folder is used to store logs like &lt;code&gt;access&lt;/code&gt; and &lt;code&gt;error&lt;/code&gt; logs. There are a couple of other folders (&lt;code&gt;private&lt;/code&gt; and &lt;code&gt;backup&lt;/code&gt;) but they are not used for simple setups (and I don&amp;rsquo;t even know how they are going to be used - may be something for a future post).&lt;/p&gt;
&lt;h3 id="enabling-the-virtual-host"&gt;&lt;a href="#enabling-the-virtual-host" class="header-anchor"&gt;&lt;/a&gt;Enabling the virtual host
&lt;/h3&gt;&lt;p&gt;Though the configuration file has been created inside the &lt;code&gt;sites-available&lt;/code&gt; folder, the nginx server still does not serve the pages of this site yet. For enabling this, one needs to create a soft link to the config file inside the &lt;code&gt;sites-enabled&lt;/code&gt; folder.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo ln -s /etc/nginx/sites-available/ex.nacnez.com /etc/nginx/sites-enabled/ex.nacnez.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This enables the site on nginx. Once you restart nginx ideally this site should be available.&lt;/p&gt;
&lt;h2 id="setting-up-the-hosts-file"&gt;&lt;a href="#setting-up-the-hosts-file" class="header-anchor"&gt;&lt;/a&gt;Setting up the hosts file
&lt;/h2&gt;&lt;p&gt;The last important step is to ensure that the hostname is configured in the DNS server to point to your machine. Since I was using it just for my local development, I went ahead and configured my &lt;code&gt;/etc/hosts&lt;/code&gt; file.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;127.0.0.1  ex.nacnez.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once this is done, we are all set. If you crank up the browser and type in the domain name you must get the content of your index page.&lt;/p&gt;
&lt;p&gt;This was my first encounter with nginx. This was enough for me for my current use of nginx. Hopefully I will get pushed to learn more on nginx and that should be fun. I did get pushed — see &lt;a class="link" href="https://www.nacnez.com/nginx-working-deepdive.html" &gt;Nginx Serves Us like this - Maybe&lt;/a&gt; for a deeper dive into how nginx actually works inside: its master/worker architecture, epoll, and event-driven request processing.&lt;/p&gt;</description></item></channel></rss>