Re: OT comprehending large application (was What, in detail, the GDK do)
On Tue, Dec 29, 2009 at 08:44:05AM -0500, Patrick wrote: > Does any one person actually understand 18K pages of this code or is it > just a case of sticking to a small section? Could any pros out there > explain how you tackle this monumental task? By combination of two means: 1) Understanding of the concepts. On this level all widgets are the same. They are GObjects, their source code is similarly organized, they can be created, destroyed, mapped, unmapped, realized, unrealized, resized, they can receive events and draw themselves and do a few other things. Many do not do all. Some are containers and organize other widgets inside. And that's just it. 2) Following the specific code I'm interested in. In a good IDE (such as vim ;-) this is usally easy. Since people often expect the widgets to do something reasonable even in non-reasonable situations this may involve reading code carefuly working about some obscure problem unclear to you. But keeping the big picture in mind the general purpose of the code should be still clear. I don't think anyone understands all the Gtk+ code, but it is not necessary. Figuring out how something in Gtk+ works has never been a big problem for me. The hard part is always to figure out how something *should* work. Yeti ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: OT comprehending large application (was What, in detail, the GDK do)
Hi Patrick, 2009/12/29 Patrick : > Does any one person actually understand 18K pages of this code or is it just > a case of sticking to a small section? Could any pros out there explain how > you tackle this monumental task? People vary in how much code they can hold in their head in any detail, but I doubt if anyone could manage 60MB of source. A lot of software design is about how to structure a large project so that you only need to understand a smallish bit at any one time. The general principle is always "divide and conquer". For GTK, you need to understand GObject (the object model) and GtkWidget (the GTK base class) and once you have that down pat, you can write your own widget subclasses. It's not so much code to understand. John ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
Re: OT comprehending large application (was What, in detail, the GDK do)
One way might be to write a "real" application (even if it's just a "Hello World" display) and "drill down" through the source code to see how this seemingly small amount of code works at lower and lower levels. While this sounds easy, it's quite a learning experience, and IMHO is well worth the time spent. Ed James On Tue, Dec 29, 2009 at 8:44 AM, Patrick wrote: ... > a case of sticking to a small section? Could any pros out there explain how > you tackle this monumental task? ... ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list
OT comprehending large application (was What, in detail, the GDK do)
"a hint to 60MB of sourcecode (18.000+ pages if printed out) " I am sorry for the quite off topic post, but I can't help myself. I am just a part time programmer, I can understand the GTK API but there is no way I could contribute anything to the code base. I have been trying to learn more about how professionals study the projects they contribute to. I have been buying books on UML and software system designs but honestly this is all a mystery to me. It does not seem that many projects bother to construct UML diagrams and surely low-level one of GTK would fill a football field. Does any one person actually understand 18K pages of this code or is it just a case of sticking to a small section? Could any pros out there explain how you tackle this monumental task? Sorry again for going off topic-Patrick ___ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list