A step-by-step guide on how to start your GNOME Journey!
Do you want to program GNOME based applications, or become a developer of GNOME itself? The following is a simple overview of how you can get started:
1. Don't go too fast
GNOME is a huge project, with lots of technologies and libraries spanning hundreds of thousands of lines of code. If you want to be successful, do not bite off more than you can handle, or jump into the deep-end of the code -- you wont be able to understand it all at once, and will become frustrated.
It is important in any large undertaking to break the work into a series of small manageable pieces: write sample applications to test out your knowledge as you go. First skim through the vast resources of information at your diposal to make sure its relevant to what you're working on right now. Save your time and attention for making your sample code work -- you can learn the rest later, when you become more advanced.
This kind of project management is critical for a programmer.
2. Decide what you want to do
If you want to write a new GNOME app, think about it twice. What are the reasons that guide you to create a new app from scratch?
Find first if an existing app can be improved, it will be benefit the whole GNOME community. Of course, if you have an innovative idea or just want to start something on your own for educational purpose, that's the good choice. You will then need a pencil and paper, and you'll have to think about it and start designing your cool new application on paper (this will take a while of course).
Otherwise you need to decide which GNOME module you're most interested in, and study up on how it works generally: read the website, join the relevant GnomeMailingLists, and stop by in the GnomeIrcChannels. Remember, you're just starting to understand the very basics. Let your curiosity and interest guide you.
3. Learn from documentation and code
Now that you know basically what libraries/tools you need to start programming, you now need to learn how they work. Go download and install DevHelp, a program that displays the library API documentation that is auto-generated from the source code. Although it won't teach you how to program a proper GNOME application, this is an indespensible resource and should be used at all times while programming GNOME.
Also, visit both developer website and this GNOME wiki to begin looking for documentation on the modules/libraries you are interested in. The developer tutorials page is a good place to start. Also, do not forget that a number of GNOME's technologies are from FreeDesktop.org, so be sure to go there to look for your documentation as well. Lastly there is always you favorite web search engine.
The most detailed but hardest to understand form of documentation is the source code itself. Grab a copy of the latest version -- but unless your a supreme coder, you won't get far by trying to read the whole thing at once. Use it as a reference when you're trying to understand small portions of the code-base.
4. Examples are good
The best way to learn how to program anything is to write very simple example programs. As you learn more, graduate to increasingly more complex code until you have a basic application working.
If the module you're learning has a tutorial, open up a text editor and terminal, and start typing in and compiling the code as you're reading. Interactivity is best.
If the module you're learning does not have a tutorial then write one as you learn by yourself. Use yourself as the target audience. What would 'you' like to know from a tutorial on this module? Even if you never show it to others, it will be invaluable to giving you a deeper understanding about the code. If you do want to let others benefit from your tutorial, please post it on this wiki, or in the project's.
Learning a module without a tutorial is tough because you only have the API documentation and source code to work with:
If the module is a library, start by browsing the API documentation to get an idea of how it works, then start writing simple trial and error programs that use the API. If you run into a road-block and cannot get past it yourself, you can turn to the GnomeMailingLists and GnomeIrcChannels to get help from fellow programmers. However, remember that the core developers/maintainers are busy people too, and you should only ask their help as a last resort.
If the module is a application, then the "API" is in the header files (.h) in the source code, and may not be well documented. You will have to begin the task of learning from the source. Once again, small trial and error changes to the source code is best.
Learning a code base is a never-ending task, so you need not task yourself with learning the whole thing at once! Break it up into pieces and come up for air once and a while.
5. Submit patches
Now you should have a very basic understanding of the module. If you goal is to write your own application, skip to the next step. If you goal is to help with GNOME, you need to start asking around how you can help out. Remember to start small, with bite-sized pieces, then work your way up to bigger things.
Check out #gnome-love on IRC or read the GnomeLove section of this wiki for advice with this, or ask your module's maintainer directly. Begin answering questions that you can handle on the mailing list, and generally participating in the community discussions. Head over to bugzilla, make an account for yourself, and start looking at the bugs for your module. Some bugs can be easily marked as duplicate, or otherwise can be updated with more correct details. If you're confident, you can try proposing a solution or even writing a patch.
6. Learn how to use the open source development tools
There are a lot of them, specialized on the kind of job they were meant to do, so find out exactly what you need to know, and don't bother with the tools that aren't relevant to your chosen task. The most important tools, that everyone should know are CVS, which is the source code repository where all the latest copies of GNOME modules are kept, and 'diff', which is a program to generate patches based on the differences between the new code you've written, and the original code from CVS.
Check out this GNOME development guide, or this development tool guide to learn how to use the programs you'll need.
7. Have fun
If you don't enjoy what you do, then you'll never stay at it.