Learn programming in GNOME
Thu 06 March 2014
Whenever I have spoken about GNOME to students (GSoC and OPW aspirants), they have all had the same starting troubles and growing pains, "How to learn GTK+?!". To be very honest, I was learning it in a rather hacky way myself too, looking at existing code and going full on copy-pasta on it.
Only today I found the sure shot way of learning GTK+ and related GNOME technologies - contributing to gnome-devel-docs. You can see the online version of GNOME's developer demos here. So how does one learn all the things that these pages talk about? Hack on it! By contributing to these demos pages, you are forced to read and try out code snippets and really Marta's (mmcasetti, it was her GSoC project) done a neat job out of it! Of course like any other software, this one too needs updating. Who better to do this than someone trying to learn to use these demos?
So your steps if you wanted to learn to use GTK+ widgets in X language would be:
git clone git://git.gnome.org/gnome-devel-docs
Now navigate in yelp browser to "Beginner tutorials" and start reading each sub page. Try out the code snippets by copy pasting them and running them. Try out other modifications suggested, if they work, great! If they don't, then fire up your editor, open the relevant *.page file and fix the instruction. Correct instructions but the language can be simplified? Edit and fix it! Of course once you edit the content, you commit it and submit a patch. :-)
I started modifying the platform-demos/C/*.pages and my commits are here. I am not new to GTK+ but am somewhat new to Python in GNOME (although its not very different from the Vala I wrote), I am beinging to see the differences and its great learning experience. In addition, having written some user documentation, I feel the need to fix the mallard code in *.pages itself for readability and other cosmetic but essential changes like grammar, punctuation and editing/simplifying sentences.