Sugar Learning Tools – Part II

It’s been many months since my visit to Barcelona and the Linux App Summit. Since then, I got unexpectedly distracted by another project , started a new job and, well, COVID-19 happened.

But, even before all that, a lot of progress was made to bring Sugar applications to the desktop with Flatpak and Flathub. I thought it would be worth sharing the progress.

Here’s a quick summary:

  • Twenty applications were ported, with the help of Google Code-In students, and are now available on Flathub.
  • Identified the most common issues of running these applications outside of Sugar. Many of those issues are handled nicely by Sugarapp now.
  • Made several upstream contributions, which also benefits other Sugar Labs community efforts.
  • The process of porting applications is decently documented.
  • Started making these Flatpak bundles easier to maintain.
  • Nowhere near to support collaboration yet.

Here’s an overview of these applications:

Abacus it quite self explanatory. What’s remarkable about this application, is that it includes a tool to build a custom abacus. Fun fact, many years ago, it was used by teachers from Caacupé – Paraguay, to build their own abacus to handle fractions. The Caacupé abacus has been part of this application since then.

Chart is a simple tool to visualize data. What’s nice about this application is that the learner can take data from other Sugar applications and visualize it. Works with the most classic visual representations.

ColorDeducto is not the typical learning tool. It’s a challenging game about recognizing patterns and developing inductive logic.  Something cool about this application is that the learner can create custom patterns using Python. The application was ported by our all-star Google Code-In winner Srevin Saju.Dimensions is a fun pattern-matching game. The learner can compete against an AI, and it can be quite challenging as categories, difficulty levels and timers start mixing .

Finance is an interesting take on learning by doing. This application can help the learners to manage a real budget, and use basic home-finance concepts while they’re at it. Another awesome port by Srevin, by the way.

FotoToon lets the learner create their own comics. It’s simple and fun.  These comics can be saved to many formats, including video. A popular choice nowadays, with everyone spamming memes at each other, haha.

What to say about FractionBounce, learn the concepts of fractions and percentages while kicking a football? It can never go wrong. Yet another port from Srevin.

Implode is a tetris-like game. Dear learner, watch out for this application, it’s quite entertaining. Don’t let anyone try it on your computer, they might not give it back for a while, hah.

Maze is a simple game but, activate these mines, turn off back tracking and go crazy with that difficulty button. It will blow anyone’s mind. This application was ported by Marcus Chong, another brilliant student and one of our runner up winners.

We are half way through the list, so let’s take a little breath and remind you that if you don’t have high school students contributing to your project, you’re really missing out.

Alright, let’s continue.

Measure is one of my personal favorites. This application bridges the real world and the digital world. The learner can visualize their own voice, tune instruments, and record and export that data to visualize it with the Chart application.

Memorize is more than just a pair-finding game, it’s a tool to create these games. Learners can mix sounds, images, text, text to speech and send these games to their friends.

Another personal favorite, Music Keyboard. Simply put, converts the learners computers into more than thirty instruments. They can record and share their masterpieces. Fun fact, my 4 year old nephews approved it, very loudly.

Physics is the perfect example of playful learning. It’s simply a physics sandbox. Learners can create structures, machines and simulations. Of course, they can also watch it all crumble, hah.

I suppose is no surprise that Pippy is my personal absolute favorite. Lets the learners write and run Python scripts in a surprisingly simple way. It comes packed with tutorials for writing Python games, physics simulations, and even GTK applications.

ReadETexts does many things. Helps the learner find books from a freely-available catalog of thousands of books. It downloads the books and it can even read them with a delightful robotic voice, hah. Works with dozens of languages. Another application ported with the help of Srevin.

It can’t never hurt to have a slipstick calculator available right? hah. I think it’s a great example of many other Sugar applications, tiny curiosity-driven tools. Sliderule is another port from Marcus.

Speak is another personal favorite. It engages the learner to write and read, while conversing with Alice, a bot with a particular sense of humor. It works in many different languages.

Story is probably one of most lovely applications I ported.  The premise is quite simple, it randomly generates a sequence of images and asks the learner to create a story that connect these images. They can record their voices or use text.

Turtle in a Pond is a gem in disguise. At first sight is simply a game about trying to catch a turtle before it runs away. The real fun though, is when the learner realizes that is possible to write Python code to make the turtle smarter.

Words is a simple, yet powerful, dictionary. Doesn’t require internet access. It can read the words and their definitions with its robotic voice. Works in many different languages.

That’s it!

The focus of this project will move onto making these Flatpak bundles more easily maintainable, for now. I am working on a BaseApp for that purpose, and will soon start updating each of these applications.

If someone is interested in any of the topics I discussed here, or just wants to contribute to this project, contact me via the GNOME Rocket chat. I can help you get started. There’s a lot of work to do!

Finally, I want thank everyone who contributed to this project during these months. Special thanks to Srevin Saju, Marcus Chong (and all our Google Code-In students), Bilal Elmoussaoui, Bartłomiej Piotrowski, Nick Richards (and all other Flathub admins who helped me with the reviews), and Jorge García Oncins for all the early testing and feedback.

Linux App Summit 2019 and Sugar Learning Tools

Last week I traveled to Barcelona, Spain to attend the Linux App Summit. For the first time, GNOME and KDE co-hosted this event to bring together everyone involved in the Linux application ecosystem. The summit was packed with a diverse audience from all over the desktop community and the world. Being there and being part of what is coming for the future of this ecosystem was truly an enriching and motivating experience.

The always-wonderful group photo

Equally important, I was able to meet with former colleagues and friends from Endless, and from the GNOME community. I made many new friends as well. All of this is certainly priceless for someone living far, far away. If you want to know more details about what happened during the summit, I highly recommend reading blog posts like the ones from Julita Inca, Daniel Garcia Moreno, Nick Richards and others. The social media coverage was superb, so check their twitter and youtube channels as well.

During the summit, I had the opportunity to present a lightning-talk titled Flooding the desktop with great learning tools. In this blog post, I will try to expand just a bit more on the details of this project. TL;DR I am making Sugar applications available to all desktops and Linux distributions using Flatpak and Flathub. But first a bit of context.

That is me making the most out of my precious five minutes. Thanks to Matthias Clasen for the encouragement and this picture.

Sugar is a unique desktop and a set of applications for Linux. It was designed for children to learn while having fun. It is Free and Open Source Software. Sugar Labs is a community of volunteers who maintains the project until this day. Since its original release, as part of the One Laptop Per Child project, dozens of educators and developers have created hundreds of great learning tools, most of which are only available for this platform.

Flatpak is a next-generation technology for building, distributing and safely running applications on Linux. It allows developers to build their applications once, and ensures that it will run properly on any Linux distribution. Beyond its technical marvels, it is a game-changing technology that will bring developers and users closer than ever before. Flathub is a community-driven hub for distributing and downloading applications powered by Flatpak. Both Flatpak and Flathub are Free and Open Source Software, as well.

I have spent many years working on desktop technologies in education and access to information, including the Sugar desktop and Endless OS. So the idea of putting Sugar and Flatpak together started a few years ago, while I was working at Endless, one of the early-adopters of Flatpak.

Sugar homepage screenshot
The Sugar desktop with a custom background image

It was easy to see that this is a clear win-win situation. Sugar has many unique learning tools that do not exist on the desktop, and Flatpak has the potential to reach new desktop users.

But, how does this project differ from the Sugar applications already available through package managers? Depending on your Linux distribution, you could technically install a small selection of these applications today. But there are two big caveats. First, you will need to install the Sugar desktop or at least some of its system services just so they can run. Second, and most important, you won’t be able to do much with these applications unless you are doing it within Sugar. These applications depend heavily on the Sugar paradigms and APIs, which are quite different from desktops like GNOME or KDE.

As an example, Sugar users don’t need to deal with file system directly, instead they use something called the Journal, which is not available outside Sugar. But they certainly need to deal with the file system in the desktop.

So, to combine both worlds, I created a small library that makes it easier to port these applications to the desktop. It provides the basic building blocks needed for the job, like:

  • A base desktop application that acts as a middle man between the desktop and the Sugar application.
  • A set of compatibility UI components that can be used as a replacement for Sugar-specific components.
  • A set of utilities to generate the metadata needed for a desktop application, basically, the appdata.xml, .desktop and mimetypes.xml files.

With the help of this library, porting applications is surprisingly easy. In most cases, the changes result in small patches that are easily maintainable downstream. Of course, this simple approach has its downsides. As an example, collaboration is disabled since there is no Sugar collaboration service, nor is mimicked by the library.

Once the application is ported, it can be packaged as any other desktop application with Flatpak and published on Flathub. I already ported a few of my favorite applications, two of which are already published on Flathub. My plan is to port as many applications as possible with the help of Google Code-in students this winter.

Abacus now available on Flathub
Music Keyboard now available on Flathub

If you find this project interesting and want to contribute, feel free to contact me!

Last but not least, special thanks to Nick Richards, a former colleague at Endless and Flathub admin, for his early review of this work during the summit, and to Javier Martinez Canillas and his family for hosting me during that week in Barcelona.

Recipes Hackfest 2018

GNOME and Endless have two similar apps, GNOME Recipes and Endless Cooking. Recipes specializes in sharing recipes between its users, by allowing them to add new recipes from the app, but the way it distributes the content is rudimentary. On the other hand, Cooking, specializes in distributing existing recipes. The distribution of this content is done with the Endless Knowledge framework and is used successfully in dozens of other Endless apps but, it is not possible to contribute new recipes from the app.

GNOME Recipes
Endless Cooking

Based on that, it was clear that both teams had a lot to share and learn from each other so, we held a hackfest at the University of AMIKOM in Yogyakarta, which kindly provided everything we needed.

From the GNOME Recipes team we had Matthias, Emel and Ekta, from the Endless team we had Philip, Emmanuele, Cosimo, Jonathan and me, and from the community we had  Umang, Ahmad, Kukuh and Siska. We also had students attendants from the university.

GNOME and Endless teams

On the first day of the hackfest both teams showed their apps. These presentations helped everyone in the room to understand the strengths and weaknesses of each app and, more importantly, to present the topics that we wanted to cover during the hackfest. The main conclusion of this session was that Recipes should use the Endless content library, and that we would aim to have this for GUADEC. Additionally, Philip did a demo about the Endless content libraries, taking an existing online content source and having it running in a native app. We also discussed ways of introducing more recipes from the local community into Recipes.

Philip writing goals

On the second day, we moved to the details of the front-end. Emmanuele talked about Emeus which triggered the discussions about the Layouts and Cards from the Endless Knowlegde framework. The conclusion was that it would beneficial to separate the Card implementation from the framework so it could be reused in other places like the Recipes app, GNOME Software and even other components of the Endless desktop. After that, we moved on hacking things. Philip started to reproduce the Recipes UI using the Endless framework, while I started converting the Recipes database into an Endless framework content.

On the last day, we showed what we hacked the previous day. I started by showing the converted Recipes database running in different Endless apps, Cosimo showed a Karaoke app that he bundled using flatpak, and Philip showed his recreation of the Recipes UI running with the converted database that I made, which looked incredibly similar and amazing.

Home page of the Recipes UI recreation using Endless framework
Real Recipes content

This exercise of recreating the Recipes app using the Endless framework was extremely helpful, because it revealed the places where we should improve our libraries to make these more flexible for new types of contents. On a personal level, this was the most productive hackfest I have attended. It gave me new directions on how to improve the tools that I am working on. Plus, it helped me to connect and to meet with a lot of new people from the community.

I really want to thank the GNOME Foundation for sponsoring my travel to Indonesia, from Paraguay, and to my employer Endless for giving me the time to attend to the hackfest.