Showing posts with label GNOME. Show all posts
Showing posts with label GNOME. Show all posts

5 August 2013

WOW.

Yesterday was the last day of GUADEC 2013 in Brno.

These past four days have been... WOW. Interesting and exciting talks (including some inspiring keynotes), great conversations, amazing human beings (once more, special mention for the Women's Dinner). It was fantastic.

I felt so well that I even managed not to make too much of a mess during my talk: I went through it a bit too quickly in the first half, but I managed to slow down in the second one (that was the one that I cared the most about), and in the end it was great having more time than previously thought for the discussion, which brought some great ideas for my future plans.

And today... Documentation BoF! Where all these plans will begin to be planned in more detail. After Ekaterina Gerasimova and Sindhu Sundar talks, after a couple of conversations with Meg Ford and Federico Mena Quintero, I am really looking forward to it.

The slides for my talk are here (.pdf). Kitten included. Have fun.

22 February 2013

Ready for Brno? I hope so!

In the last week I revised as much Python 3 as I could, and I tried to teach myself the basics of JavaScript. And let's not forget Mallard!

The (Not So Evil) Plan:

  • To give a closure to that Python tutorial! If it is possible to give a closure to something... ;-)
  • To help as far I can, particularly with the other developer tutorials (thus particularly with the JavaScript tutorial).
  • To tackle Izidor Matušov (again, as far as I can: I remember that he is quite tall) and start working on Getting Things GNOME, finally.
  • To have fun! Well, that's always part of the plan...

Will I be able to follow my plan? In everything? At least in part? Will I freeze in the -11°C I read about on BBC Weather?

More news to follow...

21 August 2012

So, how did it go?

The ButtonBox had some problems. Namely: it was a calculator... that did not work! At least, not if you tried to do something along the lines of "2 + 3 - 1".

I spent half a day re-writing the methods for calculating things, remembering my reverse Polish notation - and now it works, at least as long as you don't require that multiplication has precedence over sum.

Anyway, then it was time for the MenuButton (with some help to use jhbuild) and the Tooltip.

The first one was done on the model of what was already done in Vala. As I said at GUADEC, reading Vala knowing a bit of Java is like reading Spanish knowing Italian: you meet a lot of false friends, but you end up getting the general meaning. So, Vala examples has been my reference for all the internship.

The Tooltip was done just adding some tooltips to the old Toolbar code. Simple, and there is already room for an exercise (I added the tooltips to 3 buttons out of 4 - who will complete the job? No-one but you, my dear reader!)

Unfortunately, due to a couple of constraints (time and being a bit under the weather) my work has stopped here. I plan to start again as soon as possible, to write that "custom widget" and to revise all the pages of tutorial (should the "API Reference" section point to the stable or to the unstable version? What do you think?).

So: how did it go?

How did the internship go? Are you really asking that?

Answer: IT-WAS-GREAT.

I have learned a lot (I much more proficient in Python, I have learned how to do at least the basic stuff with Gtk+, I have managed to get along with git...), I am much more confident about my skills (in programming in particular and in "keeping a job" in general), and my ability to learn something new quickly.

So: when do we start doing something new again?

Soon, I think... Watch this space!

Last but not least: another HUGE thank you to Marina, for organizing the Outreach Program for Women and to Tiffany, for being such an extraordinary mentor... thank you, really, from the bottom of my heart.

16 August 2012

Near the end, a cliffhanger.

(As in every half-decent movie!)

The time of my internship in the Outreach Program for Women is almost over! A GIGANTIC THANK YOU to Marina, Tiffany and everybody that has given me the opportunity to participate in the OPW. I cannot start expressing how grateful I am for the chance... and for the confidence boost that comes with it!

But the time is not over yet, and I still have work to do.

I have to do: example of MenuButton (ok), of Scrollbar (ok, I guess), of StatusIcon (it has appeared there tonight: is it going to be a sisyphean work? - but ok, again!), of Tooltip (I plan to do something simple, so: ok)... and a "create your own" widget.

And that is not ok.

I am completely at loss for ideas! So, please, dear readers... if you have any suggestion, let me know in the comments! I cannot guarantee I will follow all of your suggestions, of course: but I would really love some input.

In the meanwhile, I am doing all over again my example for ButtonBox, since I was inspired by the "nifty calculator" by Daniel Sielgel. Mine should be a bit simpler, though...

(Also missing - alas, completely missing! - are the exercises for the tutorial. That will be a work to be done after the end of the internship - my goal now is to have all the examples and theory pages ready for the 20th. Yes, that includes the mysterious "custom widget"! As I told you in the title, a cliffhanger...)

Comments & suggestions, as usual - and more than usual! - are welcome in the comments.

1 August 2012

GUADEC + 1 (actually: + 2)

OK, I got it wrong.

GUADEC did not really end on Sunday.

On Monday, I went to my first hackfest - the PyGObject hackfest. It was fantastic. Thank you to Martin Pitt and Paolo Borelli and John Palmieri and everyone (sorry, I am terrible at remembering names!) that helped me to learn so many new things. Thank you, in particular, for your patience with this beginner.

On Tuesday, I finally sat down at a table with Tiffany and we redesigned what I am doing for this summer, given the many useful suggestions we had during GUADEC. The new idea: you should be able to consult the "example" pages (which are divided into: example, code for the example, useful methods, API references, exercises) both from a page that groups the widgets by "category" (windows, display widgets, buttons...) and from a page that gives you a series of "lessons" - a more "sequential" tutorial. The former is aimed at more expert hackers, whereas the latter is for almost absolute beginners. In the latter there are also the "theory" pages (properties, the MVC design...). For the order of the tutorial I owe a lot to Taryn Fox's page here (although I changed some things).

Any suggestion is, as always, very welcome!

28 June 2012

Theory and practice are always the same thing. In theory, not in practice.


Ok, I said: "The main idea: one page, one widget; one widget, one page." in the last post about the 0 Beginners Tutorial, two weeks ago. (My, how time flies and all that sort of things!)

Of course, since things are never going to be as planned, this is not what will happen.

First thought, about ten days ago: "It would be nice to talk a bit about strings and Unicode, on the model of what Sebastian Pölsterl does here". Then it occurred to me that also this page of his tutorial is a great model too.

So: three pages (strings, signals and callback functions, properties) that are not attached to a widget - but linked from some widgets' pages.

Then I was about to rewrite the TreeView widget documentation page, and the ComboBox documentation page... and here comes the idea to write a page about the Model/View/Controller design, about TreeModel and its implementations ListStore and TreeStore, so that the similarities of TreeView and ComboBox are clearer (and therefore it is easier to learn both - my opinion is that ComboBox is slightly easier, but difficulty is always subjective!). Also: in the plan for the tutorial there are two ComboBox examples and four TreeView examples. To repeat a long explanation on the M/V/C design and the methods for TreeModel & friends would make things more confused.

So, now: off to write the M/V/C design page! And then hopefully I will be able to write some code samples again... I miss my Python! (Sorry Mallard, nothing against you...)

As usual: your thoughts? Ideas?

14 June 2012

What's in a page?

A page of the O Beginners Tutorial for Gtk+ in Python, I mean...

First of all, there is an image of a window with the widget "in action".

Then there is the code to get exactly that example. Heavily commented: each line is explained (ok, the "here we set the width and the length of the window" is left out after a couple of examples).

In some cases, here there is a note to comment the code even further.

Then (thanks Jewelfox for the idea!) a series of "useful methods for this widget". I am thinking of writing this part as a list (one method for each bulletpoint), but in a relatively conversational style because a "plain" list could bore you and make you miss some parts while you skim over it. A great help in this is the tutorial by Sebastian Pölsterl, from which I already took an example (and that has been my Rosetta Stone between the C of the Gtk+3 Reference Manual and Python).

Finally, all the links to the pages in the Gtk+3 Reference Manual that I used to write the example.



Is there anything else you would like? Is there anything else you would do differently? If so, leave a comment...

And the Bigger Picture? The Tutorial Itself?

The main idea: one page, one widget; one widget, one page.

Then: a map! A graph to describe "from here you can go here, there, or there", and "to get here you will need what you learn there". And how would you do that? Only via hyperlinks on the page? Wouldn't they get lost in the variety of links described above - and wouldn't the bigger picture of the tutorial get lost in it? On the other hand: a "real" graph for all the examples needed for the tutorial could be a little too tangled...

[And: how's the work progressing? After a first very rough draft of many (but not all) widgets, so far I have written better pages for the window widgets (Gtk.Window, Gtk.ApplicationWindow, Gtk.Dialog, Gtk.AboutDialog, Gtk.MessageDialog) and I am now dealing with version 0.2 of the display widgets' pages (Gtk.Image, Gtk.Label, Gtk.Spinner, Gtk.Statusbar, Gtk.Progressbar). To come: buttons and toggles, numeric and text data entry, Gtk.TextView and more, including list and tree widgets (and therefore Gtk.ListStore and Gtk.TreeStore).]

8 June 2012

Yet another OPW update!

What, more than ten days have already passed from my last post? What was I thinking? What was I doing?

Oh, yes: I was writing! Code and documentation pages!

First look at the "samples needed" section in the Documentation Project page, then I look at the Gtk+ 3 Reference Manual. When I find a sample that is needed that sounds doable given my current knowledge, I write an example. If an example is already there in another language (usually Vala, thanks Tiffany!) I "translate" it in Python; otherwise I improvise.

Then there is the documentation: if the example is a first, I take a screenshot (Taryn explained here the magic of alt-prt sc - and much more; for the combobox the setting "take screenshot with some delay" was needed to capture the menu that was dropped down, and some Gimp was needed to delete drop shadows). Then I write a .page in Mallard on the model of the ones already there (thanks all the documentation team that wrote that page). The page so far is only composed of:
  • screenshot
  • short explanation of what the screenshot is
  • code used to obtain that screenshot (in the best cases, very commented along the lines of "here we do this; here we do that")
  • links to the Gtk+ 3 reference manual pages I looked at when I wrote the code (this part is missing in some pages, I promise to do it as soon as possible). I know: those pages are written for C programmers. Some of the methods don't work in Python. If anyone has any idea of something more Python-friendly I can link, please tell me!
Is there something else you would like? Is there something you would like to be different?

Finally, I commit with git my work, as explained - again - here.

Repeat for each sample...

[Final note, the usual: "things I would have done differently with hindsight": the combobox after the treeview was much easier. But maybe it is because the model is the same, so the problem was getting in the mindset...]

[Another final note: yes, the list was also because I wanted to see the little feet on my post on the Planet too.]

[Really-final note: I ask a lot of questions, I would love to hear from you in the comments. But: due to having an annoying internet stalker - long story, it even involved London's Metropolitan Police at one time - I have to moderate all my comments in all my blogs. So: I'm sorry for the delay, please bear with me while I approve your comment...]

26 May 2012

New examples (they know where their towel is).

Yesterday I managed to write the example of a GtkScale and the one of a GtkSpinbutton.

Yesterday was Towel Day.

Guess at which value the screenshot showed them?

SpinButton...
...and Scales!
(Both examples also use a Statusbar.)
(On a more serious note, a lesson from yesterday: if the interpreter does not return any error but something is wrong, always check if you're using the constructor in the correct way. For instance I tried for 3 hours to write the GtkScale as
scale = Gtk.Scale() 
scale.new_with_range(Gtk.Orientation.HORIZONTAL, 0, 100, 5)
and variations on the theme, only to get a scale - without a handle! I had to do a
scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL, adjustment=some_adjustment)
to get the desired result...)

Update: Now the examples use a label. Simpler, more elegant.

21 May 2012

So...

Let's start!

Hi, I'm Marta, I am a OPW intern. I want to write a "0 Beginners Tutorial" for using Gtk+ in Python.

How did I end up here? I wish I knew... no, wait: I know! It was something along the lines of...

No balloon, so far, but a lot of fun!

(This great cartoon was found here! Always give credit where credit's due...)

Thanks to my mentor Tiffany, in the last weeks I have already begun playing with Gtk+ and Python. So far: a Button, a Label and and Image (note to self: next time, do them in reverse order, easier to harder - although label and image have more or less the same difficulty); and a window using MessageDialog and one with a Dialog (note to self: as above - although I understand [but maybe I'm wrong! If so, please tell me in the comments!] that MessageDialog is the "easy" version, writing the Dialog was much easier).

And now: off to do something! There are still a lot of examples that need to be done...

23 April 2012

Why the title...?

Well, I got in. GNOME Outreach Program for Women, GOPW if you like acronyms.
So, now: a blog! A technichal blog!
But before getting to the technical stuff: why the title, you might ask? That is why I love to cook, and there is an old story about programming and women. I found it here.
So now you know: I am a feminist, I love to cook, and I would like to be a computer programmer. Quite a lot, I know.
(Oh, by the way: I have a lot less hair than the computer girl in the photos. One cannot have everything.)