Planet Sugar

Planet Sugar is a collection of personal blogs by Sugar Labs contributors. Sugar Labs is a world-wide organization of passionate people working together to solve the same problem: giving everyone an opportunity to learn to learn. Our community members write about what excites them about learning, Sugar, and the Sugar community. In the spirit of free software, we share and criticize—that is how we learn and improve and encourage participation by newcomers. Enjoy and join the conversation.

April 17, 2014

Somos Azucar

Resumen de actividades Laboratorios Azúcar April 17th

Este es el resumen de actividad para la comunidad Laboratorios Azúcar.

Éste se compone de una agregación de fuentes como nuestro gestor de tareas, Wiki, y blogs.

Puedes publicar un comentario o participar de diferentes formas.

Si tienes una noticia o una fuente que deberíamos incluir (como un blog, etc), avísanos a todos(arroba)

Hubo 18 eventos esta semana.

generic (feed #8)
generic (feed #8)
generic (feed #9)
generic (feed #9)
generic (feed #8)
generic (feed #9)
generic (feed #3)
generic (feed #9)
generic (feed #3)
generic (feed #8)
generic (feed #8)
generic (feed #8)
generic (feed #9)
generic (feed #8)
generic (feed #9)
generic (feed #8)
blog (feed #5)
generic (feed #9)

by operador del sitio at April 17, 2014 12:34 AM

April 16, 2014

OLE Nepal

XO Data Visualization in the Field

After spending three months volunteering at OLE Nepal in Kathmandu, I got an opportunity to participate in a field trip to visit  program schools participating in OLE Nepal’s laptop program. Long-awaited time has come! Even though I missed an earlier trip to Baglung as I was bedridden with bronchitis, I recovered in time to join [...]

by martasd at April 16, 2014 08:35 AM

April 10, 2014

Somos Azucar

Resumen de actividades Laboratorios Azúcar April 10th

Este es el resumen de actividad para la comunidad Laboratorios Azúcar.

Éste se compone de una agregación de fuentes como nuestro gestor de tareas, Wiki, y blogs.

Puedes publicar un comentario o participar de diferentes formas.

Si tienes una noticia o una fuente que deberíamos incluir (como un blog, etc), avísanos a todos(arroba)

Hubo 9 eventos esta semana.

generic (feed #3)
blog (feed #5)
blog (feed #5)
generic (feed #3)
generic (feed #3)
generic (feed #8)
generic (feed #9)
generic (feed #8)
generic (feed #9)

by operador del sitio at April 10, 2014 12:33 AM

April 03, 2014

Sugar Labs Argentina

Que hay de nuevo en Sugar 0.100 y Sugar 0.102

Para nuestra charla mensual con docentes, organizada por Claudia Urrea, preparé dos videos, para mostrar que hay de nuevo en las últimas versiones de Sugar.

<object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=",0,40,0" data-thumbnail-src="" height="266" width="320"><param name="movie" value=";f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata"/><param name="bgcolor" value="#FFFFFF"/><param name="allowFullScreen" value="true"/><embed allowfullscreen="true" height="266" src=";f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash" width="320"></embed></object>

<object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=",0,40,0" data-thumbnail-src="" height="266" width="320"><param name="movie" value=";f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata"/><param name="bgcolor" value="#FFFFFF"/><param name="allowFullScreen" value="true"/><embed allowfullscreen="true" height="266" src=";f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash" width="320"></embed></object>

by Gonzalo Odiard ( at April 03, 2014 01:01 PM

Concurso de fondos de pantalla de Sugarlabs

SugarLabs invita a participar del concurso para crear fondos de pantalla para la próxima version de Sugar.

Ahora que en Sugar se puede cambiar el fondo de pantalla, sería genial poder acompañarlo con una colección del mejor arte hecho por nuestros usuarios. Creemos que es una forma de estimular las capacidades artísticas e involucrar a los niños en el proyecto de forma creativa.

Se pueden crear las imágenes con cualquier actividad, Pintar, Grabar, TortugArte, e inclusive con otros programas. El concurso comienza el 1ro de Abril y termina el 31 de Mayo.

Los invitamos a difundirlo para que participen la mayor cantidad de niños posible.

by Gonzalo Odiard ( at April 03, 2014 12:58 PM

April 01, 2014

Walter Bender

Sugar Digest 2014-04-01

Sugar Digest

1. Daniel Narvaez just released Sugar 0.101.6 (unstable). See 0.102/Notes for detailed notes on changes since Sugar 0.100. The tarfiles are available at [1], [2],
[3] and new test builds are being prepared (keep an eye on 0.102/Testing). We’ve entered Feature Freeze (which had been extended by three weeks to enable us to land a few more features). Time to chase down bugs. Tip-of-the-hat to Gonzalo Odiard, Martin Abente, and Manuel Quiñones, who put so much effort into getting the last few features over the hump. Also, an extraordinary number of new features were contributed by our Google Code-in students: special kudos to Emil Dudev, Ignacio Rodriguez, and Sam Parkinson. Finally, it was really nice to see so many first-time contributors.

2. Gonzalo has made some videos demonstrating the new features in both Sugar 100 and Sugar 102.

3. We are reviewing Google Summer of Code applications. We had 35 applicants this year. We’ll know in a few weeks how many slots we get from Google.

4. I traveled to Colombia a few weeks ago with Claudia Urrea to visit a wonderful ANSPE project in Chia being run by Aura Mora. Saw some old friends (Sebastian Silva, Laura Vargas, and Sandra Barragán) and made many new friends. The highlights for me were the two Turtle Art workshops: one at the National University in Bogota and the other with the children in Chia.

5. Claudia and Erik Blankinship joined me on a panel discussion at LibrePlanet 2014. The panel, which will be available online, was “No more mouse: saving elementary education”.

:The lack of a mouse and the presence of “the mouse” are having a detrimental impact on global elementary education. The rush to adopt tablets is putting passive tools of consumption into the hands of young learners at a time in their development when “making” is paramount. The “Disneyification” of media further erodes the opportunity for personal expression by young learners. In this panel we will characterize these threats and discuss strategies for combating them.

In the community

6. Sugar Camp #3 - Paris, hosted by Bastien Guerry, will be held from 12-13 April in Carrefour Numérique – Cité des Sciences.

7. Claudia will be hosting a Learning Chat on Wednesday, 2 April, at 10AM EST, 15 GMT. The guest speaker will be Gonzalo. Please join us at #sugar-meeting. (These meetings will be held regularly on the first Wednesday of each month.)

8. The Sugar Background Image Contest has begun.

Tech Talk

9. I wrote a new activity while I was in Colombia: Word Cloud is a simple activity for generating word clouds from text.

10. Another new activity worth mentioning is Flappy by Alan Aguiar. Enjoy. (I cannot get past the first gate.)

Sugar Labs

11. Please visit our planet.

by Walter Bender at April 01, 2014 10:24 PM

March 19, 2014

OLPC San Francisco blogs

It's alive!

Given the recent excitement of dead/alive discussions about OLPC and olpc, I've put together a short set of questions to help assess where the "organization" is. By organization, I don't mean a company or an institution, but the organization in general. The questions are about mission, vision, strengths, and so on.

Here's the survey.<wbr></wbr>d/1Nm5Tgm7HNRgySAAvvXOXE4l9OSi<wbr></wbr>ZMMbUCKhQokQD8n0/viewform

Don't peek into the results spreadsheet until you've taken a shot at the questions yourself. This will keep your responses objective. Above all, be sincere and descriptive in your responses.

Responses spreadsheet:<wbr></wbr>UnBzS2dIbHBXQTJDdVZoR29HSkE#<wbr></wbr>gid=0

Let's see what picture emerges.

by sverma at March 19, 2014 04:00 PM

March 10, 2014

Walter Bender

Sugar Digest 2014-03-09

Sugar Digest

1. Wow. We’ve surpassed 10 million downloads from

2. Daniel Narvaez just released Sugar 0.101.4 (unstable). See 0.102/Notes for detailed notes on changes since Sugar 0.100. We’ve entered Feature Freeze. Time to chase down bugs.

3. In preparing the release notes, it was really nice to see how many contributors we have. It was also remarkable to see how many commits were made by Gonzalo Odiard. Kudos.

4. Google Summer of Code applications can be submitted beginning Monday, 10 March. Applications close on 21 March. See How to participate.

In the community

5. Sugar Camp #3 – Paris, hosted by Bastien Guerry, will be held from 12-13 April in Carrefour Numérique – Cité des Sciences.

Sugar Labs

6. Please visit our planet.

by Walter Bender at March 10, 2014 12:07 AM

February 25, 2014

OLE Nepal

The Wise Man in the Training

The narrow training hall in the KP Plaza Hotel, crammed with 24 teachers, one school supervisor and four OLE Nepal staff, resembled the crowded fish market in the heart of Kathmandu. Actually, it was not exactly a hall, but a balcony turned into a hall by hanging curtains along the three open sides. The cold [...]

by Sunil Pokhrel at February 25, 2014 07:36 AM

February 23, 2014

OLPC San Francisco blogs

Coffee table books

Coffee. I'm a fan! I have a coffee table at home as well, although my kids use it to stage their Lego handiwork, so it's hardly used as a coffee table. Whether you have a coffee table or not, here are three versions of a coffee table book that we produced for various community summits. These books were given away as raffle prizes, but these are also for anyone to purchase. The pricing is at cost, as determined by Blurb, the press that produces the paper copies. Pick a softcover version, or a hardcover with a dust jacket. We are happy to share these with you - with gratitude to an incredible project, the fantastical world of children around the world and the wonderful community that makes it all happen. Get one for yourself, or give one as a "Thank you" gift to those who have helped on this journey. Enjoy!

by sverma at February 23, 2014 03:23 AM

February 20, 2014

Mihaela Sabin

AP CS Demographics Gaps – New Hampshire’s Story

<iframe frameborder="0" height="446" marginheight="0" marginwidth="0" src="" width="595"></iframe>

Google Drive copy at

Filed under: education, STEM, teaching and learning

by Mihaela Sabin at February 20, 2014 03:00 PM

February 04, 2014

Tomeu Vizoso

Multi-touch gestures in Mutter-based compositors

A customer has asked for documentation on handling multi-touch gestures in their Mutter-based compositor (see my previous post) and I thought that it could be a good idea to have it in the GNOME wiki, in case it helps when they are added to GNOME Shell:

Multi-touch gestures in Mutter-based compositors

I'm not sure of what would be the best use for multi-touch gestures in the Shell, probably for resizing windows (with a 4-finger pinch gesture) or for switching desktops (with a 3 or 4 finger swipe). Probably some ideas can be taken from the multi-tasking gestures in recent versions of iOS, such as using pinch gestures to activate hidden panels or to switch to another views.

Something I feel strongly is about restricting system-wide gestures to more than 3 fingers, because the user experience and the implementation gets quite complicated if the compositor and the applications need to compete for touch sequences in similar gestures.

It's currently a bit convoluted due to zero support in Mutter for touch events, but once the Shell starts using touch events, I think it will make sense to move some of the setup and boilerplate into Mutter.

Once more, thanks to my employer Collabora for sponsoring this work:

by Tomeu Vizoso ( at February 04, 2014 02:59 PM

January 24, 2014

Fargo XO / Sugar Labs NDSU

Is Coding the Language of the Digital Age?

Is Coding the Language of the Digital Age?.

The “program or be programmed” discourse has legs! Rushkoff published his book in 2010.  2012 was “dubbed” code year.  “Code Hour” is taking 2014 by storm, and it is getting attention in the mass media (if NPR counts).

by kab13 at January 24, 2014 10:17 PM

January 15, 2014

Fargo XO / Sugar Labs NDSU

December 30, 2013

OLPC fun in Bhagmalpur, India

Mission accomplished?

When I teach IT strategy, one of the first things I emphasize on, is that the mission is a more abstract, long term concept, and anything that changes the mission with changes to the market, competitors, collaborators, and other forces is probably not the mission to begin with. The mission is supposed to be like a lighthouse, guiding the ship through troubled waters and fog. Imagine your lighthouse changing coordinates every time the seas got rough! Your mission needs to be stable, so that you can hope to achieve it! If your “mission” changes that often, it ain’t mission; it’s just operational fidgeting. You’d be surprised how often organizations have trouble getting the operational mixed up with the strategic. Don’t believe me? Check out what Prof. Michael Porter has to say!

<iframe class="youtube-player" frameborder="0" height="312" src=";rel=1&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent" type="text/html" width="500"></iframe>

I use a simple tool in my class to describe driving towards a strategic goal, and how one can get derailed. The Mission and Core Competencies (MCC) matrix was published in the mid-nineties. It’s a comparison between the mission and core competencies of an organization. For simplicity’s sake, the author has divided the “mission” and “core competencies” scales into poor and good. This results in a 2×2 matrix, giving us four possible places we can be. We should be in a drive position, where the fit with both mission and core competencies is good. However, that’s not always the case. The organization can be in a drain, dilution, or distraction quadrant. While MCC was created as a tool for strategic management in organizations, it’s also a good approach for making decisions about everyday situations.

Mission and Core Competencies Matrix

Mission and Core Competencies Matrix

For instance, if the project at hand is a good fit with the mission, but we lack the competencies to get the job done, it becomes a dilution. In such a case, we usually hire new talent to improve competencies (long-term), or we outsource to an external agency. Working with open source software gives outsourcing a whole new meaning. Think about how much of the work at OLPC is “outsourced” (in a sense) to Sugarlabs, where volunteers build, test, debug and produce software for all the XO laptops worldwide. It’s a fascinating mechanism, but more on that some other time.

Of course, nobody wants to be in the drain quadrant. It’s a whole lot of fiddling and fidgeting, usually fuelled by hubris and/or groupthink. Once again, open source plays interesting angles here. Because open source encourages tinkering, (scratch an itch), getting focus can be hard, and hobbyist tinkering can do more harm than good, especially for getting the project out of the drain box. The early stages of XSCE comes to mind, when I think of this quadrant. Things have gotten much better, but we aren’t drive‘ing yet.

If the competencies are there, but it does not fulfil the mission, many organizations will take on the project to earn revenue (with a promise/commitment of doing so short term, until things get better), and then they slide down to modifying their mission to make it all fit. The dreaded distraction quadrant! This works short-term, but the trouble with this approach is that you end up solving the wrong problem. Lowering the bar (or raising it, if you are into limbo) makes it easier to “succeed”, but you may end up cheering the wrong kind of success.

Perhaps it’s simpler to think of it as a tale my grandmother used to tell us (aka streetlight effect). In short:

Once upon a time, a man got home late at night, and lost his keys while trying to open the door. It was quite dark there. So, he went searching for the keys by the lamp post. When asked why, he said “I know I lost my keys by the door, but the light is better here.”

For us, in the Bhagmalpur project, the mission is for the children to learn. The ways are via critical thinking and problem-solving, hence the focus on Sugar.  The computers double up as information delivery channels, hence our focus on offline servers and Internet access. That’s a plus, but it’s more of a consequence. If the critical thinking and problem solving parts go well, the community will be better at using the newly-acquired information to make better, informed decisions. Thus far, Sugar and XO laptops have been the most viable for us. Therefore, that’s the way forward. We are not really grounded/concerned directly about cheap tablets or Android, or next newfangled thingamajig, or even about “what Santa may bring for Christmas”. What we are concerned with, is that the upcoming generation learn to solve their problems locally and thrive.

Searching for these keys in the dark is going to be very difficult, but unless we get the correct set of keys, we can’t really open the door!

Onward and upward into 2014.


by sv3rma at December 30, 2013 11:55 PM

December 18, 2013

‘Til All Are One

Interview with Australian Council for Computers in Education Learning Network

Adam Holt and I were interviewed last night by the Australian Council for Computers in Education Learning Network about our not-for-profit work to improve educational opportunities for children in the developing world.

<iframe allowfullscreen="" frameborder="0" height="315" src="" width="560"></iframe>

We talked about One Laptop per Child, OLPC Australia and Sugar Labs. We discussed the challenges of providing education in the developing world, and how that compares with the developed world.

Australia poses some of its own challenges. As a country that is 90% urbanised, the remaining 10% are scattered across vast distances. The circumstances of these communities often share both developed and developing world characteristics. We developed the One Education programme to accommodate this.

These lessons have been developed further into Unleash Kids, an initiative that we are currently working on to support the community of volunteers worldwide and take to the movement to the next level.

by Sridhar Dhanapalan at December 18, 2013 05:04 AM

Creating an Education Programme

OLPC Australia had a strong presence at 2012 in Ballarat, two weeks ago.

I gave a talk in the main keynote room about our educational programme, in which I explained our mission and how we intend to achieve it.

<iframe frameborder="0" height="315" src="" width="420"></iframe>

Even if you saw my talk at OSDC 2011, I recommend that you watch this one. It is much improved and contains new and updated material. The YouTube version is above, but a higher quality version is available for download from Linux Australia.

The references for this talk are on our development wiki.

Here’s a better version of the video I played near the beginning of my talk:

<iframe frameborder="0" height="315" src="" width="560"></iframe>

I should start by pointing out out that OLPC is by no means a niche or minor project. XO laptops are in the hands of 8000 children in Australia, across 130 remote communities. Around the world, over 2.5 million children, across nearly 50 countries, have an XO.

Investment in our Children’s Future

The key point of my talk is that OLPC Australia have a comprehensive education programme that highly values teacher empowerment and community engagement.

The investment to provide a connected learning device to every one of the 300 000 children in remote Australia is less than 0.1% of the annual education and connectivity budgets.

For low socio-economic status schools, the cost is only $80 AUD per child. Sponsorships, primarily from corporates, allow us to subsidise most of the expense (you too can donate to make a difference). Also keep in mind that this is a total cost of ownership, covering the essentials like teacher training, support and spare parts, as well as the XO and charging rack.

While our principal focus is on remote, low socio-economic status schools, our programme is available to any school in Australia. Yes, that means schools in the cites as well. The investment for non-subsidised schools to join the same programme is only $380 AUD per child.

Comprehensive Education Programme

We have a responsibility to invest in our children’s education — it is not just another market. As a not-for-profit, we have the freedom and the desire to make this happen. We have no interest in vendor lock-in; building sustainability is an essential part of our mission. We have no incentive to build a dependency on us, and every incentive to ensure that schools and communities can help themselves and each other.

We only provide XOs to teachers who have been sufficiently enabled. Their training prepares them to constructively use XOs in their lessons, and is formally recognised as part of their professional development. Beyond the minimum 15-hour XO-certified course, a teacher may choose to undergo a further 5–10 hours to earn XO-expert status. This prepares them to be able to train other teachers, using OLPC Australia resources. Again, we are reducing dependency on us.

OLPC Australia certifications


Training is conducted online, after the teacher signs up to our programme and they receive their XO. This scales well to let us effectively train many teachers spread across the country. Participants in our programme are encouraged to participate in our online community to share resources and assist one another.

OLPC Australia online training process

Online training process

We also want to recognise and encourage children who have shown enthusiasm and aptitude, with our XO-champion and XO-mechanic certifications. Not only does this promote sustainability in the school and give invaluable skills to the child, it reinforces our core principle of Child Ownership. Teacher aides, parents, elders and other non-teacher adults have the XO-basics (formerly known as XO-local) course designed for them. We want the child’s learning experience to extend to the home environment and beyond, and not be constrained by the walls of the classroom.

There’s a reason why I’m wearing a t-shirt that says “No, I won’t fix your computer.” We’re on a mission to develop a programme that is self-sustaining. We’ve set high goals for ourselves, and we are determined to meet them. We won’t get there overnight, but we’re well on our way. Sustainability is about respect. We are taking the time to show them the ropes, helping them to own it, and developing our technology to make it easy. We fundamentally disagree with the attitude that ordinary people are not capable enough to take control of their own futures. Vendor lock-in is completely contradictory to our mission. Our schools are not just consumers; they are producers too.

As explained by Jonathan Nalder (a highly recommended read!), there are two primary notions guiding our programme. The first is that the nominal $80 investment per child is just enough for a school to take the programme seriously and make them a stakeholder, greatly improving the chances for success. The second is that this is a schools-centric programme, driven from grassroots demand rather than being a regime imposed from above. Schools that participate genuinely want the programme to succeed.

OLPC Australia programme cycle

Programme cycle

Technology as an Enabler

Enabling this educational programme is the clever development and use of technology. That’s where I (as Engineering Manager at OLPC Australia) come in. For technology to be truly intrinsic to education, there must be no specialist expertise required. Teachers aren’t IT professionals, and nor should they be expected to be. In short, we are using computers to teach, not teaching computers.

The key principles of the Engineering Department are:

  • Technology is an integral and seamless part of the learning experience – the pen and paper of the 21st century.
  • To eliminate dependence on technical expertise, through the development and deployment of sustainable technologies.
  • Empowering children to be content producers and collaborators, not just content consumers.
  • Open platform to allow learning from mistakes… and easy recovery.

OLPC have done a marvellous job in their design of the XO laptop, giving us a fantastic platform to build upon. I think that our engineering projects in Australia have been quite innovative in helping to cover the ‘last mile’ to the school. One thing I’m especially proud of is our instance on openness. We turn traditional systems administration practice on its head to completely empower the end-user. Technology that is deployed in corporate or educational settings is typically locked down to make administration and support easier. This takes control completely away from the end-user. They are severely limited on what they can do, and if something doesn’t work as they expect then they are totally at the mercy of the admins to fix it.

In an educational setting this is disastrous — it severely limits what our children can learn. We learn most from our mistakes, so let’s provide an environment in which children are able to safely make mistakes and recover from them. The software is quite resistant to failure, both at the technical level (being based on Fedora Linux) and at the user interface level (Sugar). If all goes wrong, reinstalling the operating system and restoring a journal (Sugar user files) backup is a trivial endeavour. The XO hardware is also renowned for its ruggedness and repairability. Less well-known are the amazing diagnostics tools, providing quick and easy indication that a component should be repaired/replaced. We provide a completely unlocked environment, with full access to the root user and the firmware. Some may call that dangerous, but I call that empowerment. If a child starts hacking on an XO, we want to hire that kid :)


My talk features the case study of Doomadgee State School, in far-north Queensland. Doomadgee have very enthusiastically taken on board the OLPC Australia programme. Every one of the 350 children aged 4–14 have been issued with an XO, as part of a comprehensive professional development and support programme. Since commencing in late 2010, the percentage of Year 3 pupils at or above national minimum standards in numeracy has leapt from 31% in 2010 to 95% in 2011. Other scores have also increased. Think what you may about NAPLAN, but nevertheless that is a staggering improvement.

In federal parliament, Robert Oakeshott MP has been very supportive of our mission:

Most importantly of all, quite simply, One Laptop per Child Australia delivers results in learning from the 5,000 students already engaged, showing impressive improvements in closing the gap generally and lifting access and participation rates in particular.

We are also engaged in longitudinal research, working closely with respected researchers to have a comprehensive evaluation of our programme. We will release more information on this as the evaluation process matures.

Join our mission

Schools can register their interest in our programme on our Education site.

Our Prospectus provides a high-level overview.

For a detailed analysis, see our Policy Document.

If you would like to get involved in our technical development, visit our development site.


Many thanks to colleagues Rangan Srikhanta (CEO) and Tracy Richardson (Education Manager) for some of the information and graphics used in this article.

by Sridhar Dhanapalan at December 18, 2013 03:51 AM

December 17, 2013

Rafael Enrique Ortiz Guerrero

Tastypie filtering

Tastypie is a django restful api

Here is a little recipe to show only the last resource of eache model exposed as WS:

class RequestResource (ModelResource):
    """ Request webservice
    class Meta:
        queryset1 = Request.objects.order_by('-id')
        queryset = queryset1.all()[:1]
        resource_name = 'requestresource'
        authorization = Authorization()

Another recipe to show also a foreing key in a given resource:

class EmployeeResource (ModelResource):
    """ Employee webservice
    user = fields.ForeignKey(UserResource,'user',full=True,null=False,blank=False)

    class Meta:
        queryset = Employee.objects.all()
        resource_name = 'employeeresource'
        authorization = Authorization()

by Dirakx ( at December 17, 2013 07:51 AM

October 02, 2013

Suraj's GSoC '13 Project

Google Summer of Code 2013 (Final blog post)

All’s well that ends well.

 Here goes the final blog post of mine about the fascinating Google Summer of Code 2013 experience.

GSoC 2013 logo

It has been an enchanting experience, right from the first time of contact with my mentor till the last mail he sent me congratulating me on passing final evaluation. I still haven’t come in terms with the fact that it has finally concluded.

Initial phase of the GSoC period was spent in trying to understand the working of the current framework, setting up sugar-build, finding how the JavaScript and Python code communicate with each other, etc.

In the process I also made my first web activity

My first web actvivity

My first web activity

In fact, I probably learnt more programming while working on this project than what I did during 6th semester. My only regret is that there is no Google Winter of Code.

My work so far:

I’ve more or less elaborated in detail on my works so far in my previous blogs, so just to summarize everything, here it goes: Initially to get a hang of the CSS stuffs in Sugar-web I worked on the radio and checkbox buttons. Then I started developing the activity palette using the palette bits which Manuel had already built. Got the activity palette to sync with the datastore as well. Later on I started with developing the Markdown the markdown activity and also got the Object chooser api into sugar-web.

While working on this learnt a lots of new stuffs, RequireJs, LESS, Jasmine, Webkit2, just to name a few. It is also heartening to see the Sugar- web already being used by developers to make web activities and once we can get in all the Sugar bits into Sugar-web, I don’t think it’d be long before we have web activities becoming as popular as python activities, if not more.

The fun part and future plans:

Interacting and working with developers around the world, staying up late night coding, is what all programmers would love to do. Now coming to two very conspicuous developers in Sugar labs team, Daniel and Manuel. They were virtually the co-mentors for my project. I must thank them loads for putting up with my carelessness at certain times and my constant bugging them for help(I never spared Daniel even he was on a holiday, yet he patiently answered each of my queries and helped me out. :P ). I only hope, one day I reach somewhere close to their level of expertise.

Hats off to Lionel!

This was the first Google Summer of Code experience for both of us, and I must confess, he has done an excellent job. Amidst all his energy sapping office work, he still found time to conduct weekly meeting, (which were done in a very organized and professional manner) responded within a short span of time whenever I pinged him and gave invaluable tips and helped me overcome many hurdles Despite being away for nearly 3 weeks on a holiday he manged to keep in touch with me and held weekly meeting, which says a lot about his dedication for his work. I’d be more than happy to be mentored by him in case I apply for GsoC next year(if he is okay with it :P ).

It is sad that all this magical experience lasted for only 3 months and I still haven’t had enough of it and that’s the primary reason why I took up a mini project in my college for the current semester, through which I can still keep contributing to Sugar Labs.

Final GSoC meeting with Lionel

Final GSoC meeting with Lionel

Lionel has some plans in store for me for the next couple of months, which I guess is something revolving around the Presence api in Sugar.


I’ve painted a rosy picture of GSoC so far, but don’t be deceived by it. Not everything went according to plan. I started with getting the latest sugar-build on my laptop. All my initial work experimentation with Sugar I did on a VM on Windows. I knew as the internship period  progressed it would get more demanding so I had to immediately get a Linux distro. I tried Fedora, it didn’t like me, and it was the same the other way around as well. So we never got along together.

Then after a little experimentation with Ubuntu 12.04(which wasn’t supported), I finally settled for Ubuntu 13.04. Occasionally it kept crashing for some inexplicable reasons and I had a hard time rebuilding them every time. Must appreciate Daniel for improving and maintaining the sugar-build and always helping out folks like me who crashed their build very often.

Crashed my build several times!

Crashed my build several times!

Getting in the Object Chooser working in sugar-web and the setting up the preview field(which I unfortunately couldn’t complete before the deadline) were two very daunting tasks. Yes, I’ve worked with Python but had a hard time figuring out the working of the asynchronous functions in Webkit. Took me more than 3 weeks to land the Object Chooser bits in sugar-web. Regarding the preview field, I tried using the html2canvas library , but it gave me cross browser issues while running on some activities. Finally settled for the Webkit way.

But on positive note I’ll be back working on them again in a couple of weeks time(as part of a mini-project in college), starting with where I left off last week.

On a concluding note, I sincerely thank Walter , Gonzalo , Martin and all the other Sugar Labs mentors for they have helped me and guided me in one way or the other. Also wish my fellow GSoCers all the best for their future endeavors. It’s been a pleasure working alongside you guys.

Adios Amigos!!

by surajgillespie123 at October 02, 2013 07:25 AM

September 06, 2013

Suraj's GSoC '13 Project

Google Summer of Code (Sugar Labs) Part 2

A little more than a month has elapsed since my last blog post on the work on my GSoC project.

This blog post will mostly revolve around a new web activity written using the HTML5 – JavaScript framework and getting in the Object Chooser functionality in the current framework.

The current datastore api in sugar-web hasn’t really been tested extensively. Therefore the primary objective behind writing this activity is to test the datastore api by bringing in the object chooser into sugar-web.

Markdown Activity

Markdown is a text-to-HTML conversion tool was made by John Gruber for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML).

Here are some of the Markdown Syntax_examples.

Markdown activity is a web activity in sugar. It contains an editor that allows to write in markdown format and you can simultaneously see the formatted text on the right hand side.

Screenshot from 2013-08-25 14:56:42

It comes in with inbuilt editor buttons which can help you format/edit the markdown content.

So anyone can write HTML content and you need not know how to make use of various HTML tags.

You can download the activity here markdown activity.

I’ve also published it on github, you can play with it on your browser here.

Features of version Markdown version 1:
- Can convert markdown text to HTML format
- Text editors buttons(Bold, Header, Ordered/Unordered List , Undo/Redo, Link, Horizontal line, Italics)
- Datastore capability (activity is automatically saved and loaded when you open it at a later stage)

Framework used
The PageDown framework is made use of to parse the markable text and convert it to equivalent HTML text.

Overview of the framework:
Used in a regular browser environment, it provides a top-level object called Markdown with two properties:
Markdown.Converter is a constructor that creates a converter object. Call this object’s makeHtml method to turn Markdown into HTML:
var converter = new Markdown.Converter();
document.write(converter.makeHtml("**I am bold!**"));

var editor2 = new Markdown.Editor(converter2, "-second", options);

The created editor object has (up to) three methods:
- editor.getConverter() returns the converter object that was passed to the constructor.

- starts running the editor; you should call this after you’ve added your plugins to the editor (if any).

- editor.refreshPreview() forces the editor to re-render the preview according to the contents of the input, e.g. after you have programmatically changed the input box content. This method is only available after has been called.


Well, I’d consider this task as the most challenging one allotted by Lionel so far. The initial work, mainly integrating the Pagedown framework into the activity went pretty fast. Pagedown framework came in with inbuilt format/edit buttons so I really didn’t have to reinvent the wheel there, I had to patch the framework in order to integrate sugar-like buttons though. The most daunting part was to bring in the Sugar Object Chooser feature into the activity.

Unfortunately, while I commenced work on this, my college reopened and I got tied up with campus recruitment and other college stuffs which impeded me from devoting all my attention towards the completion of the task.

Nevertheless, with help from Daniel, I managed to get the object chooser up and running in the sugar-web.
As I mentioned earlier, the main intention of this task was to test the datastore api in sugar-web. I can confidently say that it served it’s purpose as I managed to unearth bugs in the datastore api. Rest assured Daniel is at it and will be fixing them as soon as possible.

Working of Object Chooser:

def show_object_chooser(self, request):

chooser = ObjectChooser(self._activity)

chooser.connect(‘response’, self._chooser_response_cb, request)

We call this function from JavaScript when we need to insert something from the journal in our activity.

ObjectChooser(self._activity) returns an object which we can use to bring up the object chooser(

Before we bring up the object chooser we have to make sure we watch out for the response signals which occur when we interact with the object chooser. We do this using chooser.connect('response', self._chooser_response_cb, request) . This calls the _chooser_response_cb function on receiving a response signal.

def _chooser_response_cb(self, chooser, response_id, request):
if response_id == Gtk.ResponseType.ACCEPT:
object_id = chooser.get_selected_object_id()
self._client.send_result(request, [object_id])
self._client.send_result(request, [None])

Screenshot from 2013-09-06 22:15:50

This part takes care of the event handling in the object chooser. The response_id is Gtk.ResponseType.ACCEPT when the user selects an object from the listed objects in the list. We send the object_id of the selected object to the web activity using self._client.send_result(request, [object_id]) and [None] otherwise.

Finally we destroy the chooser object object created earlier and it closes the object chooser window.

I must thank Daniel for patiently answering each of my queries regarding the same and lent a big helping hand, and Lionel, who despite being away on vacation still found time to monitor and give me invaluable inputs on my work. Credits goes to Gonzalo Odiard too , for the markdown activity idea was initially proposed by him. This activity would be very useful as future help content for activities could be written in markdown. Looking forward to my next post where I’ll try to sum up all my work and write more about my GSoC experience by the end of this month , by when, hopefully I would have successfully completed my project.

by surajgillespie123 at September 06, 2013 07:07 PM