Lalit Pant is a prominent Scala contributor based out of Dehradun. He is the creator of a learning software platform called Kojo. We invited him to give the keynote at the First Annual Pune Scala Symposium where he demoed the power and simplicity of Kojo. We take this opportunity to talk to him to find out how he is using Kojo to teach school children about programming, science, maths, and more!

Tell us a bit about yourself and what you are doing.

I'm a teacher and programmer based out of Dehradun, India.

In an earlier life, I was a professional programmer. In that phase of my career, I built many, many systems (over the course of about 16 years) using a range of languages – C, C++, Java, Prolog, Ruby, Python, and most recently, Scala. Some of the companies I worked at during this time were – Tata Consultancy Services, an AI startup, Sterling Commerce (an AT&T and then IBM subsidiary), and Valtech.

These days, I work on developing tools for technology enhanced interactive learning. In specific terms, this means working on Kojo and the learning material around it.

What is Kojo and who is it intended for?

Kojo is a learning environment for children. Within Kojo, children Play, Create, and Learn.

They play with computer programs, shapes, colors, and math. They play with Ideas. They create drawings, animations, and games. And they learn thinking skills, computer programming, math, and more...

Kojo is meant for 8 to 80-year-old kids!

Who uses Kojo?

Kojo is used in homes, schools, and events around the world. Some of these include:

Also, Kojo is open source software and can be freely downloaded from http://kojo.in. Lots of people use it without telling me about it – there are ~30 downloads and ~50 online launches per day. Over the past year, it has been downloaded in over 150 countries (with the US, Sweden, and India being the top 3).

How do schools use Kojo?

Different schools are free to use it differently, in whatever way works best for them. The general model is to have activity classes 3-5 times per week, where kids can have one hour long sessions with Kojo, with up to two kids working on a computer. These activity classes happen outside the teaching of the core curriculum, and are cross-curricular in nature, involving learning in the areas of computer programming, math, etc.

An interesting case study is the Science Center LTH at Lund University in Sweden, which uses Kojo in a very different way. The general goal of the science center is to reach out and help to increase interest in engineering education among the youth in southern Sweden. School groups visit the science center during weekdays, while it is open to the public on weekends. A project called ”Programming for Everybody” (PfE) was started at the science center in 2012, with the goal of (1) developing programming experiments for visitors – to introduce them to the joys (and importance) of programming, and (2) doing teacher training – to enable subsequent follow-up in schools. Kojo is used for this project. Since the start of the project, more than 7,000 kids have tried out the programming experiments in Kojo.

More than 60 teachers have passed the programming courses comprising two half-days with assignments in between. Kojo has also been used at Lund University by grad students as a prototyping tool for requirements engineering, and for controlling Arduino boards.

How did it start?

A little while after arriving back in India in 2009 (after living in the US for about 11 years), I started teaching math at Himjyoti school, Dehradun. While working with the kids there, I found that the standard approach to teaching math was dry, very abstract, removed from reality, and not much fun for kids (or teachers). Key elements were missing – real world relevance, interactivity, feedback, and the ability for each child to learn at his or her own pace. I decided to do something about this, and thus Kojo was born – as an interactive learning environment, where kids could play with concepts in the areas of programming, math, and science.

Why did you use Scala for Kojo?

Scala is a language with a low floor, a high ceiling, and wide walls. That makes it very easy for kids to get started, but they have lots of room to progress to whatever level of programming expertise they care to reach (Scala has great support for object-oriented and functional programming, and comes with a good set of data structures and algorithms). In addition, Scala runs on the Java platform, and anything written in Java can be accessed from Scala. This provides kids the opportunity to leverage a wide range of libraries in different areas for their more advanced projects.

Scala also has the virtue of being a real programming language (as opposed to a toy language for kids) with a solid theoretical foundation. Knowledge that kids gain within Kojo is directly applicable to industry and academia.

All of these were good reasons to use Scala for Kojo. But there was also an element of personal motivation. I wanted to use Scala for my own projects (for its fun, power, and depth), and I wanted a solid Scala prototyping environment for this. I made Kojo this environment – so Kojo is also a nice Scala playground for professional programmers!

Scala is a pretty sophisticated and complex language. How do kids cope with the complexity?

To begin with, the kids don’t see any complexity at all! They just get on with drawing stuff using the turtle commands. The first glimmer of complexity shows up when they have syntax errors in their code. The compiler error messages are sometimes tough to understand. But kids work around this in an ingenious manner – they ignore the text of an error message! Instead, they make use of the hyperlink in the error message to navigate to the line in their program that contains the error. Looking at that line, they are mostly able to determine what the problem is.

As programs get more complex, kids are given a conceptual framework to help them read and understand programs, and think about how programs are structured – they learn that a program is a series of instructions for the computer, where each instruction is either a command, a function, or a keyword instruction; they also learn that programs are built using primitives, composition, and abstraction. These ideas give them a useful framework to understand programs written by others and to build programs of their own. This approach has worked well with most kids.

How powerful and scalable is Kojo?

Kojo is very powerful and scalable. To get an idea of this, look at what it contains:

A very powerful and scalable language (Scala).

A very powerful and scalable runtime (the JVM).

Access to a huge software ecosystem (all the open-source Java projects out there).

Good graphics support – a Turtle graphics API inspired by LOGO and a functional Pictures API. These can be used to build drawings, animations, and games.

A powerful virtual lab for math (GeoGebra and Arithmetic Aerobics).

All of this is packaged in a friendly environment that supports syntax high-lighting, code completion, code templates, evaluation worksheets, interactive program manipulation (IPM), and program-tracing.

What has been the kids reaction to Kojo, to the language? How have they adopted it?

Kids have been very enthusiastic about Kojo. They have dived in and enjoyed the act of play and creation inside Kojo. I have seen kids with very little inclination for studies spend hours (one hour per sitting) engrossed in the creation of a drawing. They make good use of features like code completion, IPM, and program tracing.

Kojo has good learning material available for beginners. This covers learning the basics of Scala programming and making interesting shapes and drawings using mathematical ideas. For kids who complete this material, there is need for more advanced material that engages them, helps them learn more powerful ideas in the areas of programming, math, and physics, and lets them make richer drawings, animations, and games.

Where is Kojo headed?

Some of the upcoming areas of work in Kojo development and usage include:

More advanced learning material.

Support for physics and better support for gaming.

Support for physical computing (via Arduino and the Raspberry Pi).

How could I contribute to Kojo?

You can contribute to Kojo in many different ways:

Code contributions – look at the Kojo dev board to see if there’s anything that you are interested in working on. Then head on over to the Kojo repo to start hacking.

Learning material contributions – look at the current ebooks and see if you want to expand on the material there.

Translation into another language – you are welcome to translate Kojo into your native language (if it is not already supported in Kojo).

As you work on any of the above, be sure to share your work with us. You can use the Kojo Forum, or email me.