Code Jugalbandi

....learning playfully through dialogues

View project on GitHub


In Indian classical music, we have Jugalbandi, where two lead musicians or vocalist engage in a playful competition. Lets say there is jugalbandi between a Flutist and a Percussionist (say using Tabla as the instrument). Compositions rendered by the flutist will be heard by the percussionist who will replay the same notes, but now on Tabla and vice-versa is also possible.You can find additional information on this wikipedia page and to get an idea here is the Youtube video:

In a similar way, we perform Code Jugalbandi to see how solution to a problem looks different using different instruments. There would be multiple such rounds during the Jugalbandi, where the Jugalbandists would change instruments to give the audience a feel of solution rendition using different instruments.

Our hope is that a Code Jugalbandi session -

  • Would give people confidence that being polyglot can be within their reach.
  • Promote learning by observation employing comparison and contrast - a natural way for human mind to grasp new things.
  • It can also become a source of inspiration to try out a new stuff, be it languages or frameworks or anything etc...
  • Also, people from one camp can peek at the other camp and tell themselves - "ah look! its similar! or it does that better!" etc..

Code Jugalbandi Notes, Sketches, etc

So far we have run Code Jugalbandi in 3 different formats:

Structure of a Demonstration

  • Intro to musical Jugalbandi, play this video and let it speak for itself (I know the resolution of the video is not that great, but I found (based on search results I got) it to be the most apt video to convey idea in less than 2 minutes to a large audience). The audience is smart enough to relate Musical Jugalbandi to Code Jugalbandi.
  • Introduce the opp person (this assumes you have 2 people, but if you have more scale it accordingly).
  • Make it clear to the audience to not focus on syntax and its okay not to follow through syntax, but really capture the essence of things beyond syntax.
  • Each Jugalbandi round is a melody.Aim for about max 15 mins per melody.
  • During the melody, limit the code lines visible at any given time to a max of 10, so that it reduces the cognitive load.

During a melody

  • Say you are the Brahma of a melody, and when playing (showing - demo) your melody, you can do loud thinking and/or soliloquies as you code along.
  • Once Brahma is done creating, Krishna replays the same melody differently and again thinks aloud while demoing it.
  • After both Brahma and Krishna are done, they converse reflecting upon the approach, pro and cons of each. This natural conversational style, like the fire-side chats will be very reinforcing and involve the audience.
  • At the end of a jugalbandi round - both bow down to the audience to indicate completion of the current round.

Repeat the above for multiple melodies.

Watch Demonstration Videos

Demo at Functional Conf - 2018 - Exploring Concurrency

Demo at Functional Conf - 2017 - Exploring Programming Paradigms

Debut at Functional Conf - 2014 - Exploring Functional Programming


  • As facilitators, begin the melody by doing a demonstration.
  • Follow each melody by an exercise for the audience. Exercises help participants reify the concepts and thus involve them completely.
  • Ask each participant to find a new fellow jugalbandist per melody and perform a code jugalbandi between them. This, in our view will maximize learning.

Watch Workshop Videos

Workshop at TechJam - 2014 - Exploring Functional Programming

Live Codejugalbandi

  • A problem statement can be given live to the audience or little bit ahead of time. Ask the audience to solve it in their choice of programming language or programming paradigm. The idea is to ignore syntax and focus on the semantics of their approaches.
  • Facilitators go first and demonstrate their approach and solution.
  • Ask anyone from the audience to demonstrate their solution to the problem. It would be really good to let the audience participant to highlight the reasoning behind their approach. Why was it chosen the way it was chosen, limitations or strengths of their approach vis-a-vis other languages and paradigms etc... can be highlighted.

Watch Live Videos

Live Codejugalbandi at Functional Conf - 2015

Essence of Code Jugalbandi

      Code Jugalbandi develops the faculty of observation first, particularly in the context of programming. By observing the same example being rendered in different languages, logical deduction becomes easier.
      Once logical deduction happens, the abstract concept can be grokked and appreciated. Further, the faculty of abstract thought develops as one reflects upon the renditions not only by comparing/contrasting similarities and differences but also reconciling them. Developing the faculty of abstract thought is a natural sequel to developing the faculty of observation.
      The faculty of abstract thought, when targeted directly is not effective without having the faculty of observation sufficiently developed.


There are many jugalbandis that can be materialized, for example, our current focus is on:

  • Exploring Programming Paradigms
    • Imperative/OO Programming Paradigm
    • Functional Programming Paradigm
    • Array-Oriented Programming Paradigm

but not limited to it, Here are a few others that we intend to explore:

  • Exploring Concurrency
  • Exploring FRP
  • Design Patterns

Do not just limit yourself to the above, however. For example, if you want to compare two frameworks, say like in the Javascript land, there are tons of MV* frameworks - AngularJS, KnockoutJS, EmberJS, Backbone etc... You could use it to enable learning of frameworks (or anything else) by comparison and contrast - a natural way for human mind to grasp new things. Participants can see can see how each one solves the same thing differently.

So just be creative in applying this Code Jugalbandi style to suit your context. Use Code Jugalbandi as a source of inspiration or a gentle nudge for people to try out a new stuff :-)


After proposing the idea of Code Jugalbandi -, it was time for me to test the idea out. Having discussed it in our Functional Programming discussion group (Aslam Khan, Ryan Lemmer and Jaydeep Kulkarni), they all thought it was a novel idea and we should give it a try.

@ryanLemmer and @softwareartisan went ahead with CodeJugalbandi's materialization. Ryan brought in the idea of Melodies to do multiple code jugalbandi rounds. Like in real musical Jugalbandi there are the two roles - the creator (and player) and the listener (and player), Ryan suggested that we give creative names to the jugalbandists who participate.
So to put things in perspective, the creator of the melody is called Brahma and the other(s) who listen to the melody and play accordingly is/are called Krishna. At the end of melody the two reflect on the renditions - by comparing, contrasting and reconciling them.

Thank-you Functional Conference - @FnConf and Naresh Jain for providing the platform to debut this.


If you feel you have liked the idea and want to contribute, we encourage pull requests. Alternatively, if you have your own repo somewhere, please send us the link and we will link to your repo from this main page.


Creative Commons License
Code Jugalbandi by Dhaval Dalal, Ryan Lemmer is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Based on a work at