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.

December 18, 2014

OLE Nepal

A Day at the Open Learning Exchange (OLE)

“ Disparity in the world is growing resulting to lack of opportunity. A single donation of money and food without a targeted solution is not the answer to reducing disparity. Give people a real chance! A basis to climb the ladder!  Basic education is the answer to do well in school and in life. If [...]

by Bibhusha Karki at December 18, 2014 03:14 AM

Somos Azucar

Resumen de actividades Laboratorios Azúcar December 18th

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 12 eventos esta semana.

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

by operador del sitio at December 18, 2014 12:33 AM

December 15, 2014

Walter Bender

Sugar Digest 2014-12-15

Sugar Digest

1. Google Code In update: After the first two weeks, we have 33 participants and almost 140 tasks completed. The pace is faster than in years past, perhaps because we have more experienced Sugar users each year. You can follow the action (the contest runs for five more weeks) at [GCI 2014].

At the current pace, almost 500 tasks will have been completed by the end of the contest. If you have project ideas, please let me (or any of the other mentors) know. We can continue to add new tasks throughout the contest. Tasks include coding, but also documentation, quality assurance, outreach, etc.

2. We continue to make progress on Turtle Blocks JS (the Javascript version of Turtle Blocks). There have been many new contributions from participants in Google Code In and in generally, the code is approaching a point of stability. You can try it by visiting [] or by downloading the activity locally from []. Any and all comments, feedback, bug reports, merge requests, and suggestions welcome.

Tech Talk

3. Martin Abente has been working on new translation platform, including a new Pootle instance. He has been adding repositories there so translators can start working. If you are interested in having your project included in the new platform, please follow these instructions:
# If you still use our old Gitorious repository, please move your projects to Github. Gitorious is considered read-only now. (See [How_to_migrate_from_Gitorious] for details about how to move projects.)
# Update this [] wiki page so we can track your project’s repository.
# Be sure to grant commit access to [sugarlabs-pootle] the Sugar Labs Github Pootle user.
# Create a new user on the new translation platform ([]).
# Please send an email to Martin (CC’ing sugar-devel) with a list of the repositories for your projects so that he can add them to Pootle. Don’t forget to specify your user name on the translation platform.

4. The final phase of the run up the the Sugar 0.104 release is testing and bug fixing. Martin has released tarballs for our (UNSTABLE) feature-freeze release, which can be downloaded from:
* [sugar]
* [sugar-artwork]
* [sugar-datastore]
* [sugar-runner]
* [sugar-toolkit]

We welcome all the help you can provide testing and fixing bugs!

Sugar Labs

5. Please visit our planet.

by Walter Bender at December 15, 2014 03:57 PM

December 11, 2014

Somos Azucar

Resumen de actividades Laboratorios Azúcar December 11th

by operador del sitio at December 11, 2014 12:35 AM

December 10, 2014

Fargo XO / Sugar Labs NDSU

The Troubling Optics Behind the President Learning to Code : Stager-to-Go

The Troubling Optics Behind the President Learning to Code : Stager-to-Go.

I was just telling a friend that I hate getting sucked in by and Code Hour and all the program or be programmed rhetoric.  Yet I keep getting sucked in.

After reading this, I will be stronger.

by kab13 at December 10, 2014 10:00 PM

November 23, 2014

OLPC fun in Bhagmalpur, India

“Whatever we don’t know, we learn by ourselves”

Here’s an interview with the kids in the village talking about their experiences of using the XO laptops and the XSCE server.
<iframe allowfullscreen="true" class="youtube-player" frameborder="0" height="312" src=";rel=0&amp;fs=1&amp;showsearch=0&amp;showinfo=1&amp;iv_load_policy=1&amp;wmode=transparent" type="text/html" width="500"></iframe>

P.S. Please excuse my horrendous voice and pitiable interviewing skills :-)

by Anish Mangal at November 23, 2014 11:23 AM

November 15, 2014

OLPC San Francisco blogs

OLPC San Francisco Community Summit 2014 - Videos

For those who were wondering about the summit videos, those are automatically archived and posted to YouTube via Google HangoutsOnAir. Very easy to manage and process.


by sverma at November 15, 2014 06:55 PM

November 09, 2014

OLPC San Francisco blogs

October 18th, 2014 Proclaimed One Laptop Per Child Day

Proclamation of OLPC DayThis year's Summit is wrapped up and behind us. Thank you all who attended in person or online. During the Summit we presented the proclamation from San Francisco's Mayor Ed Lee that Saturday October 18th, 2014 is One Laptop Per Child Day!

Our community works hard to bring child-centered education to some of the most remote places in the world. By leveraging technology, we've created an ecosystem of self-empowered learning which can reach a very broad audience. From our beloved green XOs, to inexpensive Android tablets, to what hardware lies beyond, students previously without access or with limited access to education and information now have a low power, low cost device with which to collaborate and explore.

These accomplishments do not come for free! Through years of research, hours of hard work, successes and failures we've accomplished a lot. There is still more to do, but we take a moment to pause and reflect. Let us recognize the hard work that we've all done.

The City and County of San Francisco recognizes this hard work. As presented at the Summit, Mayor Ed Lee has proclaimed Saturday October 18th, 2014 to be One Laptop Per Child Day! The proclamation reads:


WHEREAS, One Laptop Per Child (OLPC) is a nonprofit organization dedicated to providing opportunities to children in underserved communities with education and technology programs geared to help them experience success as adults in a technology-driven world; and
WHEREAS, OLPC has provided millions of children worldwide with a laptop enabling their access to education through technology and building positive identities that will also benefit the communities in which they live to advance and prosper; and
WHEREAS, OLPC is dedicated to low power, low cost, low maintenance hardware, with free and open source software, designed for collaboration and self-empowered learning; and
WHEREAS, under the exceptional leadership of One Laptop Per Child's dedicated staff and volunteers in San Francisco and beyond, the organization has provided countless opportunities to children worldwide and has improved the quality of life for those challenged with the lack of available resources in their communities; and
WHEREAS, our City commends and thanks the volunteers, staff and advocates from all over the world who are gathering in San Francisco physically and virtually for the annual OLPC Community Summit to continue growing and developing this tremendous endeavor; now
THEREFORE BE IT RESOLVED, that I, Edwin M. Lee, Mayor of the City and County of San Francisco, on the occasion of the sixth annual OLPC Community Summit, do hereby proclaim October 18th, 2014 as...
IN WITNESS WHEREOF, I have hereunto set my hand and caused the Seal of the City and County of San Francisco to be affixed.
Edwin M. Lee

The work of this community is monumental towards bringing education and opportunities to some of the most under represented places and people of the world. Volunteers from our community, not just us here in San Francisco, not just those of us who attended in person at the Summit, but our global community. Congratulations to all of you!


by adborden at November 09, 2014 03:45 PM

November 03, 2014

Walter Bender

Sugar Digest 2014-11-03

Sugar Digest

1. I spent the month of October reacquainting myself with Javascript. Since I cannot learn without learning about something (to paraphrase Seymour Paper), I wrote a new version of Turtle Blocks in Javascript. It is far from finished, but it is already usable (at least from a Chrome browser — for some reason I have broken it on Firefox). Feedback most welcome both in terms of the activity itself and any improvements I can make to the code. (Note: saving is a bit flaky at the moment, so please be prepared to lose your work.)

It is inevitable that Javascript/HTML5 is in our future and so I am determined to make the best of it. While we were in San Francisco at the Google Summer of Code reunion, Martin Abente, Gonzalo Odiard, and I sent time with Raul Gutierrez Segales working on several aspects of the Sugar-web framework, including a model for “under the tree” collaboration. Martin wrote a simple server using and I wrote a simple neighborhood view that lets you see your collaborators. We had the opportunity to bounce ideas of Ben Schwartz, Sameer Verma, Aaron Borden, and Bernie Innocenti.

Raul, Martin, and I also did some brainstorming about developing a new web backend for the Sugar datastore based on git. Details to follow.

Tip of the hat to Alex Kleider, who hosted our Sugar Camp on his houseboat in Redwood City. Alex has also been providing me with comprehensive feedback on Turtle Blocks JS.

Aside: Raul added a wrapper to Turtle Blocks JS that enables it to be launched as a Facebook App. Not public yet as we await Facebook approval, but it opens some interesting possibilities about where we can take some of the core ideas from Sugar.

2. The Google Summer of Code reunion was lots of fun. A chance to catch up with old friends and to help bring into focus some future directions. I spent time with the Google Code In team and I got Sugar Lab’s application submitted. We still need to flesh out the wiki page with more task ideas and add our growing mentor list. Please contact me regarding details.

3. Gonzalo, Aaron, and Sameer organized Turtle Art Day San Francisco in conjunction with the OLPC SF meeting. While more sparsely attended than we had anticipated, nonetheless, it was an enriching experience for those who came. Martin also joined the fun, helping with some Turtle Bots programming.

4. It is not too late to toss your hat into the ring for the annual Sugar Labs Oversight Board election (AKA SLOBs). Four (4) seats are open (due to staggered seat terms) for election / re-election to the Sugar Labs Oversight Board for 2013-2014, those of Daniel Francis, Gonzalo Odiard, Adam Holt, and Claudia Urrea. Please let me know if you are interested running for one of our board seats and also, please add your self to the candidates’ wiki page. Also, since only members receive ballots, please be sure to sign up for membership by following the instructions in the wiki. Finally, we need help running the election itself. Please contact me (or Luke Faraone) if you are interested in helping.

Sugar Labs

5. Please visit our planet.

by Walter Bender at November 03, 2014 04:03 PM

October 03, 2014

Mel Chua

Unlock challenge: raise $1024 for The Ada Initiative, support women in open tech/culture, and unlock more open-licensed “programming learning styles” material!

Last year, I wrote a post asking people to donate to the Ada Initiative and support women in open technology and culture. I said:

We change the world with millions of tiny patches… our world of open technology and culture is built one patch, one line, one edit at a time — and that’s precisely why it’s powerful. It brings billions of tiny, ordinary moments together to transform the world. If we teach it for our code, we can preach it for our giving. If you’d buy me a drink, or treat an open source newcomer to dinner, send that $3-$20 to the Ada Initiative tonight. –August 30, 2013

Why do we need to do this? Well, being a woman in open technology and culture is like riding a bike on a street made for cars, where rain and dirt get kicked into your face, and you are constantly, painfully aware that if you have any sort of collision with a car… the car will win. Yes, this is happening in our world, to our friends and to our colleagues; it’s happened to me personally more times than I care to remember. The farther you are from the straight white male difficulty setting, the rougher the terrain becomes.

And quite honestly, we’re busy. I’m busy. You’re busy. This isn’t our job — we have so many other things to do. I mean, we’re all:

  • remixing music
  • playing with code
  • writing science fiction
  • co-authoring open content articles
  • redesigning user interfaces
  • <insert your favorite open technology and culture activity here>

And guess what? There are so many people who want to join us. So many people who want to help us do all this work, but don’t, because they know that work — the good work — is likely to come with a lot of really, really awful stuff, like this sampling of incidents since last year (trigger warning: EVERYTHING).

The less time women spend dealing with that stuff, the more time they have to help us with our work. And the more people will want to help us with our work. I mean, would you want to accept a job description that included the item “must put up with demeaning harassment and sexual jokes at any time, with no warning, up to 40+ hours per week”?

Making our world a good environment for all sorts of people is, in fact, our job — or at least part of it. The folks at the Ada Initiative have made supporting women in open tech/culture their entire job — supporting it, supporting people who support it, and basically being the equivalent of code maintainers… except instead of code, the patches they’re watching and pushing and nudging are about diversity, inclusion, hospitality, and just plain ol’ recognition of the dignity of human beings.

They want to support you. With better conference environments, training workshops and materials, and really awesome stickers, among many other things. (Did you know that the Ada Initiative was one of the first woman-focused tech organizations to actually say the word “feminism”?)

So please, donate and support them, so they can support you — and me, and all of us — in supporting women in open tech/culture.

Now, my own contribution is a bit… sparse, financially. I’m a grad student earning less than $800 a month, and I’m waiting for my paycheck to come in so I can contribute just a few dollars — but every little bit helps. And there’s another way I can help out: I can bribe you, dear readers, to donate.

Remember that “active vs reflective” learning styles post I wrote in August? Well, there are 3 more: sensing/intuitive, visual/verbal, and global/sequential. I’ve got them all transcribed here and ready to go. And if we reach $1024 in donations to the Ada Initiative under the Learning Styles campaign within the next week, I will release them under a creative-commons license.

What’s more: the first 3 people who donate $128 or more to this campaign and email me their receipt will get a free 1-hour Skype call with me to discuss their personal programming learning styles, and will be featured as case studies on one of those three posts (I’ll link to your website and everything).

Donate to the “learning styles” campaign for The Ada Initiative now!

by Mel at October 03, 2014 03:56 AM

September 29, 2014

OLE Nepal

Exploring faraway land in far west

This was my second visit to Bajhang. The first one was about three months ago where we went to train the teachers from 10 different schools on using laptops and implementing the ICT based education. This visit was intended for the further enhancement of the teachers’ skill towards integrated teaching via in-school training. In addition [...]

by Bibek Maharjan at September 29, 2014 11:18 AM

September 22, 2014

Porting Sugar to Python3

GSoC 2014 - Porting to Python3 Round Up

Hello Everyone,

This is my round up post for my GSoC 2014 - Porting to Python3 Project.

I know I am almost a month late but it's better late than never i guess.
Just after the GSoC coding period was over my internet broke down and I was completely without internet for almost two weeks and just after that I got busy with my exams. My exams finished yesterday, so here I am today.

When I started the project I expected to complete it even before the deadline, but the more I got into it I realized how wrong I was. The actual changes I made were trivial Python3 syntax changes but finding where the problem was kind of difficult because of the subtle differences between Python2 and 3 due to which building the modules wouldn't completely stop but gave unexpected results. So most of my time this summer went into researching, debugging and handling multiple modules together.

So, in the beginning of the project i researched the changes that needed to be made from Python2 to Python3 then i started with porting sugar-build to Python3 which took quite some time because it was the first module. All the modules that I ported and the changes I made can be found in my previous posts.

I also researched the changes that needed to be made in telepathy-python which is now deprecated and not compatible with Python3.Basically , we would need to replace telepathy-python with gobject-introspection in sugar in order for everything to work correctly in Python3.
By the end I was able to port and build all the modules of sugar except sugar-datastore to Python3. Now all those modules are compatible with Python2 as well as Python3.

Although this is a big step in the right direction , it will still take along time to completely shift all the sugar modules to Python3.

In the end I just wanna thank the Sugarlabs for making me a part of their community and specially my mentors Walter Bender, Gonzalo Odiard and Sameer Verma for helping me with any problems that I faced.

Although I think that I could have learnt a lot more if I had a more personal and bonding interaction with any of my mentors but I still learnt a lot during this summer and I am grateful for that.
I'll also try to stay in touch with the happenings of Sugarlabs and try to contribute whenever possible.

I guess that's it for today , thanks for reading and goodbye!

by kunal arora ( at September 22, 2014 03:13 PM

September 08, 2014

Sugar Labs Argentina

Cumbre Juvenil - Montevideo, Uruguay (September 20 a 23 de 2014)

Comparto invitación al evento

Queridos colegas,
ANEP (Administración Nacional de Educación Pública) y Sugar Labs se han propuesto organizar una Cumbre Mundial Juvenil de Programadores, un lugar de encuentro entre jóvenes de distintas partes del mundo que se encuentran trabajando en el desarrollo de software. Aprovechando este espacio de encuentro, queremos convocar a líderes de programas educativos interesados en el potencial que la tecnología tienen en el aprendizaje, y el promover participación auténtica de los estudiantes en este contexto.

Quiénes deben participar:
- Jóvenes de los diferentes programas educativos, que se hayan destacado por su interés en la programación y/o que hayan realizado contribuciones concretas al desarrollo del ambiente de aprendizaje Sugar.
- Líderes de los programas, interesados en participar en una serie de reuniones estratégicas para definir el futuro del ambiente de aprendizaje Sugar.

Por qué participar en este encuentro:
- Para trabajar y aprender con jóvenes desarrolladores de Python, reconocidos internacionalmente,
- Ayudar a definir el futuro del ambiente de aprendizaje Sugar y las futuras generaciones de software para aprendizaje,
- Para conectar con expertos, convencidos del potencial de la tecnología en el desarrollo y aprendizaje de los jóvenes,
- Para fortalecer la comunidad de usuarios del ambiente de aprendizaje Sugar alrededor del mundo.

Todos los interesados en participar en este importante encuentro deben ponerse en contacto con nosotros inmediatamente. ANEP ha ofrecido financiación de gastos locales para los jóvenes que participarán en este evento.

José Miguel Garcia

Walter Bender
(Sugar Labs)

Para incribirse solo deben ingresar al siguiente formulario:

by Gonzalo Odiard ( at September 08, 2014 05:10 PM

August 30, 2014

Sugar Cordova

The Final Post

Sorry people, been a long time since the previous post. The reason being I was busy coding up the plugins and things, so never got much time to concentrate on posting side. Never mind, we are back with a whole wrap up post for all of you. Also made videos to demonstrate the concept.Hope you find it interesting.

Its been months of hard work and thought process. Days full with coding and exploring things in and out. Must say it has been a great experience working for Sugarlabs as a part of Google Summer of Code. My mentor , Lionel Laské , has a great share to that, he has been very supportive in all the adventures and trusted upon me which infact boost my motivation to work for the project. I have seen mentors forcing their students to accept their methodology and do the way they want , but the best thing I liked about this was the exploration part, where we were free to dive into the different parts of code, swim through them till we got our treasure ;-) During this exploration we faced many issues, but thanks to the support of Gonzalo and Walter who used to help us whenever we required.I use to trouble Gonzalo a lot when it came to the native part of plugins, asking him how that could be done or why it didnt work as expected. Thanks Gonzalo for your support and time without which I guess the project wouldn't have been where it is.
Things still remain, but I hope to work on it after gsoc too :-) gsoc has been just a medium to be introduced to such a lovely community and I would like to thank Google for that , for introducing such a wonderful programme which brings together the developers and students to make some magic ;-)
Talking about the project progress - it is through with the cli part and plugins like - accelerometer, camera, dialog,device, globalization and network. We hope to develop more and improve upon those which we already have. Also we aim to club this with sugarizer. I had decided to make some videos during mid of August showing the working but the week which I kept for making videos , suddenly my system crashed ( because of update from ubuntu 12.04 to 14.04) so instead of making videos, I had to debug it and bring it back to the working state.Now its up and working :-) (thankfully ! ) I made a few videos to give you all an idea of what we have tried to achieve. Please go through these ( Make sure to switch on the subtitles if not already ):

<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>

Making a sugar activity from web app using cordovoa

<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>

Demo of the plugins coded through the summer

Hope you find the video useful,Here is the repo link which you would require incase you decide to play around with the code<wbr></wbr>puneetgkaur/sugar-cordova

Also as the project is not completed we would be up on it and pushing more changes , so keep around ;-) 

by Puneet Kaur ( at August 30, 2014 04:45 PM

August 17, 2014

Fargo XO / Sugar Labs NDSU

Tissue Paper Reforms: Coding for Kindergartners | Larry Cuban on School Reform and Classroom Practice

Tissue Paper Reforms: Coding for Kindergartners | Larry Cuban on School Reform and Classroom Practice.

Larry Cuban’s post provides a really nice, concise history of Logo and coding efforts.  As he notes at the end, the Papert effort can be inspiring and instructional, as it has been for our Sugar Labs effort, but we also hit a wall and have suspended the program, as Cuban would expect . : )

by kab13 at August 17, 2014 01:55 AM

August 13, 2014

Tomeu Vizoso

Dynamic scaling of the memory bus

The problem

These days there's quite good support for CPU scaling in the mainline kernel, and many ARM SoCs are making use of it already. But in modern hardware with lots of very fast external memory, running the memory bus at its maximum frequency drastically reduces the amount of time that the device can run when on battery.

A problem that many teams are finding when trying to upstream their power management code is that there's currently no way for several clock consumers to influence the frequency of the memory bus. There has been a few tries to upstream the solutions currently in vendor trees, but so far no acceptable solution has been found.

I'm helping to upstream some of the stuff in the ChromeOS tree, and this issue is currently blocking very interesting work from reaching mainline.

The past

In the vendor tree for Tegra this is addressed by creating virtual clocks that are child of the clock that wants to be influenced. Depending on the type of the virtual clock, setting its rate will influence the rate of its parent clock by setting a floor or ceiling value.

In Qualcomm's vendor tree for the Snapdragon family of SoCs, the concept of a voter clock is introduced. Drivers can vote on the rate of a given clock by "voting" through a child clock, so not that different to how Tegra does it.

Both approaches have the critical disadvantage of adding clk instances for things that aren't real clocks, thus making the API considerably more confusing for relatively little gain.

Both vendor trees have additional API for registering bandwidth needs: tegra_isomgr and msm_bus_scale. They bear quite some resemblance with each other and with pm_qos_interface, but both are tightly tied to specificities of their platforms.

The discussion was brought back to life a couple of months ago when a patch was posted for allowing the tegra-drm driver to set the frequency rate of the external memory controller based on the amount of bandwidth that was needed by the display controller for refreshing the display. Of course, that patch was rejected because there are other components that need to have a say in the frequency rate of the memory bus.

But in that discussion some kind of plan took form and I have been working on making something from it that can be merged upstream.

A possible future

There's so far two main additions to existing frameworks, with the rationale being explained further below:
  • Add per-user floor and ceiling constraints to the Common Clock Framework, so drivers can set maximum and minimum frequency rates that the clock should respect. Patchset here.
  • Add a PM_QOS_MEMORY_BANDWIDTH class to pm_qos, for drivers to register their expected bandwidth needs. Patchset here.
The idea is for the following agents to be able to influence the current frequency of the memory bus:
  • Thermal: a cooling device would call clk_set_ceiling_rate to cap the memory bus to a frequency based on the current temperature.
  • Power: a battery driver would set a ceiling in the same way, based on the remaining capacity.
  • Devfreq: a devfreq driver wrapping a power management unit such as the ACTMON on Tegra or the PPMU on Exynos would set a floor frequency based on the current load stats.
  • Cpufreq: a cpufreq driver would set a floor frequency based on the current CPU frequency.
  • Devices that can anticipate how much memory bandwidth will need (such as the display controller, the camera, multimedia codecs, an ISP, USB, etc) would register their requirements in the PM_QOS_MEMORY_BANDWIDTH class. The EMC driver would be listening for notifications and setting a floor frequency based on the aggregated bandwidth that is needed.
The impression so far is that this approach matches the needs of the Tegra and Exynos SoCs, and people working on Rockchip upstreaming are evaluating it. Others working on other SoCs are very welcome to look at it and comment, so the result is also useful to them and they can improve their power management in mainline without having to refactor things later.

by Tomeu Vizoso ( at August 13, 2014 03:36 PM

August 01, 2014

Sugar Experiments of gp94

GSoC Update #8

This week was spent mostly on writing tests for Read. The major issue we were facing is that, we couldn’t open files in Read activity using the objectchooser. So, Gonzalo sent a novel way of doing the same use case. in a different way and it worked perfectly. Here is the link of the conversation on the mailing list.

I have successfully written tests for Read and also added some helper functions in of sugar-toolkit-gtk3 that are required for writing tests for the activities.

Here is the commit of the test of the Read activity and here is the merge request/codereview for the same.

Here is the commit of the helper functions for in sugar3 and here is merge request/codereview for the same.

Next week, my focus will be work on the writing tests for imageviewer using the same approach as used in Read activity. After, the same is done and time is left then I will also continue on the work where I left off for Browse activity.

August 01, 2014 06:32 PM

July 30, 2014

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 July 30, 2014 03:24 PM

Git for Sugar

One of the firsts walls or obstacles to enter Sugar development is learn our favourite control version system [git], although somewhat counter-intuitive at the beginning, git is a very powerful tool, I wish there could be another way to have a collaborative way of development for kids, but we are not yet there.(could be other ways?)

For starters you would have to go to our web-ui git instance called [gitorious],

you can clone

git clone git://

or make a personal clone of a project of your election on the web-ui.

keep your project up-to-date with

git pull

you can also make a patch and sent it ot the developer

git format-patch HEAD^

Note: is preferable that you generate your patch from the root directory of your project.

if you want more visibility or reviews you can also send your patch to sugar-dev mail list.

git format-patch -s -1
git send-email --to maintainer --cc mailing-list filename
For example:

git send-email 0001*.patch

as a maintainer you can apply patches, sent by others, in this case you have
a file called sugar_fixes.patch

git apply --stat sugar_fixes.patch
git apply --check sugar_fixes.patch
git apply --apply sugar_fixes.patch or git am --signoff

o make merge requests using gitorious ui.

Some commands may seem very hard, but it's a matter of practice, and the combination of command line interface and gitorious ui, could be very practical both for development in terms of code maintain and for coordinated and collaborative development between various people.


by Dirakx ( at July 30, 2014 03:23 PM

July 22, 2014

Sugar Cordova

Working of sugar cordova


So its been some time after the previous post and we have made some serious progress after that :-)

The  work undertaken and done are as follows :

1. Improving upon on the codebase for cli
2. Making the basic layer for cordova for sugar to add plugins upon it
3. Making cli work on the windows platform
4. Completing accelerometer
5. Working on camera

So to discuss what we have got through this time ,I would like to take you through an example of a simple Hello World app , telling you how you can generate your own .xo from any web app and deploy it to your sugar environment.

To be precise, a web app signifies a bundle of files written in html,js and css and having some backend logic to perform a concrete task.Now the point concerning here is to get that web app to your sugar environment. The steps involved would be :

1. Setup your development environment - follow the instruction mentioned here
2. Issue  the following command to  to create a new cordova app :
cordova create <app_directory> <app_package_name> <app_name>
3. Now insert all your web app stuff to the www directory of the newly created project
4. To convert this web app to the .xo isa two step process : 
       (i) first add the sugar platform to your newly created cordova project by using command : 
cordova platform add sugar 
       (ii) Then you build the project after making changes to web app if you wish to make any; by the command: 
cordova build sugar
       (iii) Find your newly create .xo in app_directory/platforms/sugar/<wbr></wbr>cordova/<app_name>.xo
5. Now we can copy and paste the .xo in our sugar environment and issue the following command to install the xo :
sugar-install-bundle <name>.xo 


1.As an added feature we have provided a --noframe option to the users who already know about sugar web. In that case we shall add no sugar -web feature in the index.html, that means the app_directory/www/index.html must contains all the toolbar and sugar ui related stuff like the index.html in the sugar-web-template. If you give no option in the build command, it is by default assumed that you dont know about sugar web and your web page is added in an iframe in the final index.html along with the sugar ui which is added around it. So you gotto decidie whether to leave the option of adding the sugar ui to the cordova-cli or do it on own. For the former you dont need any option and its activated by default while the later can be acheived by issuing the --noiframe option along.

2.In the windows environment the zip command that is used to create the .xo by the cordova build command doesn't work. So we provide an alternative for that. All the windows users are expected to set an environment variable name ZIPCOMMAND to something similar to the "zip -r" for windows. That is, it should be able to create a zip file recursively, as an option , people can use 7zip which gives an excellent command line tool for creating zips. So install 7zip and issue the following command before issuing cordova build command on windows : 
set ZIPCOMMAND="c:\Program Files\7-Zip\7z.exe" a -r -tzip -aoa

Apart from this, we are currently working on providing you with various plugins for cordova which shall make the communication with the device capabilities easier. You can find the plugins here :<wbr></wbr>puneetgkaur/cordova-plugins , so in this repository we have two folders : one for the plugin and other a sample sugar cordova with the concerned plugin.

Have a look at the sample web app we used : 

Screenshot of the web app in the browser :

The web app as in the sugar shell :

Source of the sample web app :



<meta charset="utf-8" />

<meta name="format-detection" content="telephone=no" />

<!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See -->

<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />

<link rel="stylesheet" type="text/css" href="css/index.css" />

<meta name="msapplication-tap-highlight" content="no" />

<title>Hello World</title>



<div class="app">

<h1>Apache Cordova</h1>

<div id="deviceready" class="blink">

<p class="event listening">Connecting to Device</p>

<p class="event received">Device is Ready</p>



<script type="text/javascript" src="cordova.js"></script>

<script type="text/javascript" src="js/index.js"></script>

<script type="text/javascript">




We'll hope to be back with  a lot of cool developments on the plugin development front, so till then enjoy experimenting with sugary cordova ;-)

by Puneet Kaur ( at July 22, 2014 01:52 PM