Planet maemo: category "feed:f306d38a63078c6d4b1ba0eef5fce639"

xan

The Facts in the Case of Mr. Epifanio Navegared

2007-12-14 23:40 UTC  by  xan
0
0

It’s been almost 5 months since the last time I blogged about Epiphany. Attentive followers may have noticed that there hasn’t been any Epiphany releases in the 2.21.x cycle so far; why? I’m glad you ask!

First, the GtkMozEmbed situation was a bit chaotic, and we were not really sure if we’d manage to have trunk in release quality levels by 2.22. Thankfully it seems the embed code will travel in time a bit, which will allow us to not take any drastic meassure. With that sorted out it seems likely know that Epiphany 2.22 will simply support both Gecko 1.8 and 1.9 through the archane but well known art known as “massive #ifdef mess from Hell”.

Second: WebKit! A lot has happened since July:

  • The embed code went through a massive refactoring: after quite a few late night hacking sessions, tens of thousands of lines of code touched, the final demise of EphyTab and other events, now it’s much easier to implement in a sane way more complete backends for the browser. As a result of this, many previously missing features of the WebKit port started to work with no need of new APIs on the engine side.
  • The Epiphany team has grown a few more wizards: thanks to Cosimo, Cyril, Jan and all the others who have recently helped with code, translations or support.
  • WebKit/GTK+ itself is progressing at an astonishing pace: there is a great team, patches and features flow every day, and the Apple engineers are extremely helpful and supportive. There’s always something to do, so come to #webkit and #webkit-gtk on FreeNode an join the party. Go WebKit/GTK+ team!

So: 2.21.4 will be released this weekend. Get it, test it, the WebKit backend works now much better than the code we shipped in 2.20.x. 2.22 will be released, as always, to the day; Mozila backend will be as awesome as usual and hopefully WebKit’s will be more or less dogfood-quality by then. But, 2.24? Man. 2.24 is going to be so awesome Jeff Waugh has promised he will personally go to your house and recite “Dónde están mis pantalones” in 25 languages when you download it. Honest.

Categories: General
xan

The Cyclomatic Horror From Outer Space

2007-10-25 17:26 UTC  by  xan
0
0

I don’t really remember how we got there, but a couple of days ago at the office we ended up talking about the complexity of the codebase we have to deal with. Tommi mentioned the McCabe cyclomatic complexity, “which may be considered a broad measure of soundness and confidence for a program“. According to the Wikipedia article it “directly measures the number of linearly independent paths through a program’s source code“. And there’s this little table, with some pre-defined thresholds:

Cyclomatic
Complexity
Risk
Evaluation
1-10 a simple program, without much
risk 11-20 more complex, moderate risk 21-50 complex, high risk program greater than 50 untestable program (very high
risk)

Well, fair enough. You always have to be a little skeptic about this kind of data, but it might give you some insights about a codebase. So “apt-get install pmccabe”, a tool to “calculate McCabe cyclomatic complexity or non-commented line counts for C and C++ programs“. The man page says:

The obvious application of pmccabe is illustrated by the following which gives a list of the “top ten” most complex functions:

pmccabe *.c | sort -nr | head -10

Sounds like fun! Let’s run it on the gtk/ directory in gtk+… (drum rolls):

Cyclomatic complexity Lines of code Function name 119 337 gtk_notebook_calculate_tabs_allocation 119 744 gtk_tree_view_bin_expose 89 467 gtk_tree_view_column_cell_process_action 88 545 update_node (in gtkuimanager.c) 68 404 gtk_tree_view_button_press 68 381 gtk_toolbar_size_allocate 64 218 gtk_im_context_simple_filter_keypress 64 230 gtk_tree_view_key_press 59 243 gtk_menu_handle_scrolling 58 175 gtk_clist_motion

Some of the functions are way past the threshold for intractability (and all of them surpass it), and GtkTreeView has 4 of the 10 most complex functions in gtk according to McCabe. I suppose you can extract many lessons from here, but I’ll only give one humble suggestion: we need regression testing for gtk, and we need it yesterday, as it seems that no human being can hack on some parts of gtk without breaking something :)

Categories: General
xan

N810 and new GTK+/Hildon stack

2007-10-17 18:33 UTC  by  xan
0
0

hildon

As others have alread commented, the new tablet is now out. But I’m a software guy, so I’ll talk about the software it runs and let others dissect the hardware.

As Michael says we had to break the API to unfuck cleanup the mess that was our stack until now. This sucks, but I think the benefits are worth it: we now use a slightly modified (but ABI compatible, unlike before) GTK+ 2.10.12, the most egregious crack is gone from Hildon, you have cairo, which is used to render almost all the text you see on the device (but use it with moderation please, it’s not a speed demon yet :)), the theming infrastructure is greatly improved, etc.

The differences in our GTK+ are documented for a change, and there’s an on-going effort to provide a coherent start page for the platform at live.gnome.org/Hildon. Now we need the validation of the community, so please port your apps and write new and excellent free software for Hildon.

Categories: General