Summer of Code/2015/Turtle Blocks for in-line programming

From Sugar Labs
Jump to navigation Jump to search

About you

What is your name?
My name is Amit Kumar Jha. I am a 3rd year undergraduate student at International Institute of Information Technology (IIIT), Hyderabad, majoring in Computer Science and Engineering(CSE).

What is your email address?
Primary- gmail
Students- students

What is your Sugar Labs wiki username?
My Wiki nick name is artista

What is your IRC nickname on
My IRC nick name is artista

What is your first language? (We have mentors who speak multiple languages and can match you with one of them if you'd prefer.)
My first language of communication is English. I am also comfortable with Hindi.

Where are you located, and what hours (UTC) do you tend to work? (We also try to match mentors by general time zone if possible.)
I reside in India. The time difference in UTC and IST being +0530Hrs. I usuallly work from afternoon to midnight but this is adjustable.

Have you participated in an open-source project before? If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?
I have being a dedicated user of the open source softwares such as Apache HTTP, Linux,Firefox, sympy etc,. But contributing towards open-source projects has been one of my recent area of interest. Since I had experience in python and javascript I started contributing to sugar labs and found working on open-source projects very intriguing and dissolving.

About your project

What is the name of your project?
Turtle Blocks for in-line programming

Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?
Often we'd like users to be able to extend or modify an activity. Rather than doing this by writing Python or Javascript, why not let them use the block language of Turtle Blocks as an in-line editor. For example, in the Turtle Pond activity, the user can upload Python code representing search algorithms for the turtle as it tries to find its way out of the pond. Why not use a block editor to write the search algorithm?

Using the Turtle Blocks engine as an editor inside existing activities would be the preferred mechanism, as oppose to constantly extending Turtle Blocks itself. This would

  1. let the editor be more specific to the needs of the individual activity;
  2. lessen the burden on the user for installing plugins and extensions;
  3. circumvent situations where there are barriers to sharing data between activities -- e.g., running outside of Sugar;
  4. perhaps encourage more developers to incorporate more programmatic elements in their activities.

The project comprises of two major tools which is done for both Python as well as Javascript version of turtle block:

  • Plugin- Create a more general plugin that could be used in other activities like physics and turtle pond activity.This plugin would allow the users to create specific blocks that can be used in the activity and hence it would contain blocks that can be used to create functions which would have the capability to get as well as return argument.
  • Debugging method- Show the error log in a separate window for both js as well as python version. This would help the user in debugging and further extend the usability of turtle block as a tool for in-line programming.

The project will be coded using javascript, python and gtk3.

Below we have the prototype of the plugin used to create “distance” function.


What is the timeline for development of your project? The Summer of Code work period is from May 26 - August 24; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it's good to have a plan at the beginning so you have an idea of where you're headed.) Note that you should probably plan to have something "working and 90% done" by the midterm evaluation (27 June); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.

Community Bonding Period(28th April-26th May)

  • Get to know the more of the community at Sugar.
  • Read on Turtle Block JS and gather more resources to aid in development.
  • Experiment with the framework and get familiar with its aspects.
  • Improve the Documentation of Turtle Block.
  • Come Up with examples to understand the functionality of each new block to be added and also enhance the old one.
  • Come Up with the test cases to test once the project is completed.

Week 1 (26th May - 1st June)

  • Create Test Cases for both the versions for dynamic testing.

Week 2 (2nd June - 8th June)

  • Add Debugging methods to javascript version.
  • Write the script to support scrubbing of code used for debugging.

Week 3 (9th June - 15th June)

  • Create Blocks to achieve the functionality of Calculate.
  • Create Blocks to achieve the functionality of argument passing.

Week 4 (16th June - 22th June)

  • Add Debugging methods to Python version.
  • Write the script to support scrubbing of code used for debugging.

#1 Deliverable

Javascript Version of turtle block supporting in-line programming.

Week 5 (23th June - 29th June)

  • Create Blocks/Plugin to achieve the functionality of Calculate Blocks.
  • Create Blocks/Plugin to achieve the functionality of argument passing.

Mid-term Evaluations(28th June-3rd July)

Week 6 (30th June - 6th July)

  • Write Unit Tests for javascript version.
  • Test on them.
  • Include them in examples.

Week 7 (7th July - 13th July)

  • Regression Testing (Javascript)

Week 8 (14th July - 20th July)

  • Write Unit Tests for Python version.
  • Test on them.
  • Include them in examples.

#2 Deliverable

Python Version of turtle block supporting in-line programming.

Week 9(24th July-31st July)

  • Regression Testing (Python)

Week 10(1st August - 7th August

  • INTEGRATION (Javascript)
  • Integration Testing (Javascript)
  • Review
  • Documentation

Week 11(8th August- 14th August)

  • INTEGRATION (Python)
  • Integration Testing (Python)
  • Review
  • Documentation

Week 12(14th August-15th August)

  • Scrub Code
  • Improve Documentation.

Final Deliverable

Release version of Sugar Labs with turtle blocks(both javascript and python) supporting in-line programming and debugging tools.

Final Evaluations(21st August-)

Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.

As part of college coursework I have participated in various individual as well as team projects with strict deadlines. The competitive atmosphere and strict deadlines in our college(IIIT-H) makes one follow the schedule strictly and come up with great quality work. The projects completed successfully are listed below:

  • Implemented an annotation tool to annotate pronouns and their corresponding nouns with a minimal AI. The tool could look at word details given in an input file and determine words which could be possible referents for a particular pronoun. The project was done in JAVA using JavaSwings and JavaFX libraries.Link-
  • Backgammon Intelligent Agent An Artificially Intelligent Agent was coded in C++ for Backgammon game. It used the concepts of heuristics and alpha-beta pruning.

I am familiar with python from nearly past three years and have also used gtk in few of my projects. I am comfortable with javascript now. Since, the summer break is the time when a student has lot of free time, one can adopt new technologies, learn new things, meet new people, share ideas and make something useful. I am good in learning things and can grasp new concepts and work quickly towards completion of project within the time boundation.

You and the community

If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.

My thoughts: This project can be seen as a stepping stone for young childrens towards developing an aptitude for programming.For developers this will encourage them to incorporate more programmatic elements in their activities.
Walterbender: One explicit goal of Sugar is to unleash the learner. One strategy he have for that is to provide scaffolding such that the user can experiment with their learning environment. Towards that end, we provide a view source mechanism, but it is a steep learning curve to go from using an activity to modifying Python or Javascript code.This project provides an intermediary step: let the use make modifications within the context of a block-based language.It is our hope that once learners get used to the idea that they can change things, then some of them might delve deeper into text based languages as well.
Gonzalo Odiard: Could be a way to introduce to computing using different tools, and make more powerful to the sugar activities.

What will you do if you get stuck on your project and your mentor isn't around?
If I need help, I usually try to figure it out myself on the web . If unsuccessful and there is no mentor to help, then I will first see for the regular contributors like ignacio, gonzalo, tch,...that may be present on IRC and seek their help, if the problem still persists then I will send a mail to the mailing list seeking for help, so that the mentor can see it whenever he comes online. Till then I will try to get involved in some other aspect/ part of the project.

How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?
I will make a micro blog where I will keep a daily log of the work that I would do as a contributor towards the organisation. Update it with weekly reports mentioning progress made till date, problems faced and solutions found to it and also the future plans. I hope to keep the blog updated and write the report every week so that people can see the updates and report and put in their feedback. Thus, all the progress will be recorded in the blog. If asked to maintain the record in the wiki, I will accordingly do so.


Send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of "logout".


Send us a link to a pull request or merge request you have made on a Sugar or Sugar activity bug.
I have been regular in the sugar community for about 2-3 months and I have compiled all the work that I have contributed towards the project till now

  • PR: Added is_prime function to the calculate activity.
  • PR: Implement select all operation when the user press Ctrl+a
  • PR: Fixed Pep8 errors  

Describe a great learning experience you had as a child.
When I got my first PC at the age of 8. The first game I played was aoe2, my experience with it has made me have keen interest in stories especially history, it taught me history better than any of my history teachers were capable of. In retrospection it shows that an active engagement with things and ideas promotes mental activity that helps students retain new learning and integrate it with what they already know.