Interview: Scala Learning Environment on the NetBeans Platform
Lalit Pant, the developer behind this application, is interviewed below, primarily about the application and what it offers, but also about its architecture and underlying philosophy.
Hi Lalit, who are you and where are you from? What do you do in your daily life?
I'm a teacher and programmer based out of Dehradun, a small town in North India. In an earlier life, I was a professional programmer (based most recently out of Dallas, TX in the US).
In that phase of my career, over the course of about sixteen years, I built many, many systems using a range of languages – C, C++, Java, Prolog, Ruby, Python, and most recently, Scala. The last ten years of that time was spent primarily with Java. Ironically, this period did not involve any Swing based projects (ironically, because now my work with Kojo is pretty heavily Swing/Java2D based).
For the past year, I have been a volunteer high-school Math teacher (who develops software on the side!) at a school for under-privileged girls in Dehradun - Himjyoti School.
OK, so what's Kojo? And what are its competing products?
Kojo is what I call a Learning Environment. Here's a screenshot:
With Kojo, I'm hoping to:
Make it fun for kids to become proficient at using computers.
Teach them programming.
Enable them to design and create interesting (virtual) things.
Allow them to experiment with math.
Within Kojo, kids play, have fun, and work in the activity areas of, Interactive Geometry and Algebra, Art, and Animation & Visualization.
Some of the other products that play in different parts of the space covered by Kojo are: Scratch (Learning to Program), Processing (Programming, Animation and Visualization), and The Geometers Sketchpad (Interactive Math).
Why is it freely available? Is it also open source?
Kojo is freely available because I don't want monetary price to be a barrier in the way of its adoption!
Kojo is open source software, and is licensed under The GNU General Public License (GPL). The source code for Kojo is available at: http://code.google.com/p/kojo/. Kojo binaries can be freely downloaded from http://www.kogics.net.
Here is another screenshot:
It is open source for many reasons:
I have been using open source stuff forever and I'm keen to make my own open source contributions.
Within an open source product, I can leverage other open source stuff and build upon the good work of others.
People can read the source, learn from it, and help make it better; their feedback can be a learning experience for me.
Schools can use the product without any fear of proprietary lock-in.
It is created on Scala. Why? And how?
For a seasoned Object Oriented developer like me, Scala was a mind-expanding experience, for at least a couple of reasons, when I first started using it about 2.5 years ago:
It exposed me to new (and very powerful) OO features (e.g., Traits, Implicits, Abstract Types, Type Constructor polymorphism etc).
It (re)exposed me to functional programming in a very practical context by allowing me to use functional programming techniques within my Object Oriented code.
Scala has kept getting better and better over the past couple of years, and it is now my preferred language for software development.
When I started thinking of creating a programming environment for kids, my de-facto choice of development language was Scala – for the reasons outlined above.
Not only that, but the learning environment teaches the user to use Scala.
Right. I decided to make Scala the user-level language that kids would program in, because:
A pretty powerful subset of Scala is very simple to use (much simpler than Java, and comparable in complexity to Python and Ruby).
If I made Scala the user-level programming language within Kojo, I could use Kojo as a REPL for my own Scala coding. I really wanted this. ;)
What are some other unique features about the application?
I think Kojo is a very interesting effort that combines:
A very powerful language
Animation and Visualization
There are other products that do one or more of the above, but nothing that I have seen that brings all of these things together quite like Kojo does.
Kojo is very young (it's just a few months of part-time work old right now). It will continue to try to innovate in this space as it grows and matures.
You used the NetBeans Platform as the application's starting point. How and when did you make that decision?
When I started working on Kojo in September 2009, one of the core features that I wanted to provide was a good editor for writing code. I wanted syntax highlighting. I wanted code completion. I wanted the ability to format code. I wanted good Find/Replace features etc.
The NetBeans Platform was an obvious choice. I had been using the NetBeans IDE to write Scala code for a while, and I knew, from personal experience, that the NetBeans Platform had everything that I required.
What were the main benefits to you of using the NetBeans Platform?
The following are some of the features that Kojo gets for free by using the NetBeans Platform:
Code Editor. A great infrastructure for code editors, making it easy to provide features like syntax highlighting, code completion, code formatting etc.
Windowing System. A great Windowing system (to dock/undock/move/customize the different windows within the application workspace).
Professional Appearance. A good professional look right out of the box.
Output Window. The Output pane for program output – with line wrapping, customizable Font, smart-scrolling, error-hyperlinking etc.
Miscellaneous. Other bells and whistles: Splash screen, About box, Installable zip-file etc.
Anything that pleasantly surprised you about using it?
A lot of the above features. I started out wanting just the "great code editor" bit and discovered the other stuff as I went along.
Also, the fact that I'm alive and in one piece despite the route that I chose to go with Kojo ;). When I started working on Kojo in September 2009, I was using:
Nightly builds of the NetBeans Platform 6.8
Nightly builds of the NetBeans Scala plugin
Nightly builds of the Scala 2.8 Language
All of this was without any prior exposure whatever to the NetBeans Platform! The initial learning curve was tough, but the fact that I did not run into any major issues is a tribute to the robustness and the modularity of the NetBeans Platform.
I must mention that your introductory screencasts Top 10 NetBeans APIs were a great help in getting me started. And I found that the "Rich Client Programming: Plugging into the NetBeans Platform" book, despite being a little bit out of date, did a good job of introducing me to the core concepts of the NetBeans Platform. Finally, your blog provided very useful tips (on doing stuff like hooking up Undo/Redo buttons to an Editor, building Popup menus based on information in the System Filesystem etc). Thanks for putting good information out there on the NetBeans Platform!
What's the future of this application -- i.e., what kind of feedback do you want from who, who should contribute and how, what new features are planned when?
Like I said before, I'm trying to make an application that can help kids learn to program and also get better at Math. I'm very hopeful that the future will see us meet this goal. My wife, Vibha, is helping me in the effort to take it to schools. We plan to start small, get some real traction at the local level, then build from there to reach more schools in India, and then finally go 'international' after that. None of this is set in stone, of course, and if opportunity leads us elsewhere, we'll follow with vigor ;). Plus, Kojo being open-source and free, people are free to adopt and use it without any 'intervention' from us – if they so desire.
In the near future, we need to work on the documentation, so that there is good guidance on how to use the powerful capabilities of the software.
There's a good set of basic features in place. Over the next few months, we'll let the interaction with kids and the gaps identified by the documentation effort guide the development of new features.
As far as feedback and help is concerned, any kind is welcome:
Testing and bug reporting.
Field testing with kids in classrooms.
Contributing interesting example programs.
Helping at the source code level by contributing bug fixes and enhancements.
Issues identified while using the software can be posted to:
Source code for the software can be accessed from:
For now, the best way to discuss things is to just to email me – pant.lalit at gmail.com. If I see the need, I'll set up a mailing list.