Difference between revisions of "GSOC newcomers"

From GCompris
Jump to: navigation, search
m
(add a code quality section)
Line 32: Line 32:
  
 
Moreover, using maniphest phabricator, you can describe precisely what you will do, state your task status and this will permit us and you to see where you are in your timeline (late or in advance).
 
Moreover, using maniphest phabricator, you can describe precisely what you will do, state your task status and this will permit us and you to see where you are in your timeline (late or in advance).
 +
 +
=== Code quality ===
 +
 +
We hope that GCompris will be maintained for years if not decades. It is thus important that your code is clean enough to be reviewed and amended by anyone knowing Qt Quick.
 +
 +
Here are some points you have to check:
 +
 +
* Copyright headers in each source file must contain your copyright if you create them
 +
* Once your code is done, make some clean up, there should not be any unused variable
 +
* Avoid files with many global variables or functions with too many parameters. This indicates that there is something wrong in your code.
 +
* Avoid repeated code. There is an option in Qt Creator to refactor a QML object. It will be put in a dedicated file named after the object id (right click -> refactoring).
 +
* Try to follow an object orientated approach by putting javascript functions specific to a QML object within the object itself instead of the global javascript file. This makes it easy to see what's possible to do with a Qml object.

Revision as of 17:37, 23 October 2015

Congratulations, you have been selected to participate to the GCompris GSOC. Here are a few links to start your community bonding period and set up your environment.

Introduction to GCompris community

Send a mail to gcompris-devel@kde.org to introduce yourself:

  • Name, country, university... Whatever you want to share that can be useful.
  • Describe what you plan to do in GCompris, which part of GCompris will you improve...

Setting your KDE account

If you don't have one, you need to create a KDE account (https://identity.kde.org/) and ask for a developer access (precise that you will do gsoc under GCompris). More information can be found at https://community.kde.org/Sysadmin/GitKdeOrgManual#How_to_get_read-write_developer_access

We also plan to use https://phabricator.kde.org/ to track our progress so you'll also need an account. It provides a lot of useful tools:

Using git on KDE

You can see the git at https://phabricator.kde.org/diffusion/GCOMPRIS/ (or http://quickgit.kde.org/?p=gcompris.git if you are not connected). As you will push work on it, you need to clone git@git.kde.org:gcompris.git.

You can create a branch for your gsoc: git checkout -b mybranch and work on it. Don't forget to rebase on master from time to time. Once you think you finished your activity, you need to create a code review for mentors to comment the code.

Informing on your progress

In a work, the most important thing is communication. Without it, we can't know what the other people are doing, if they have issues... Do not hesitate to discuss as long as you have issues to be sure you've understood and fixed all of them.

Also, for Google purpose, you need to create a blog detailing what you have done. If you do not have one, you can create one using https://pages.github.com/ or Wordpress.

Moreover, using maniphest phabricator, you can describe precisely what you will do, state your task status and this will permit us and you to see where you are in your timeline (late or in advance).

Code quality

We hope that GCompris will be maintained for years if not decades. It is thus important that your code is clean enough to be reviewed and amended by anyone knowing Qt Quick.

Here are some points you have to check:

  • Copyright headers in each source file must contain your copyright if you create them
  • Once your code is done, make some clean up, there should not be any unused variable
  • Avoid files with many global variables or functions with too many parameters. This indicates that there is something wrong in your code.
  • Avoid repeated code. There is an option in Qt Creator to refactor a QML object. It will be put in a dedicated file named after the object id (right click -> refactoring).
  • Try to follow an object orientated approach by putting javascript functions specific to a QML object within the object itself instead of the global javascript file. This makes it easy to see what's possible to do with a Qml object.