Acid3, make QtWebKit catch up

Acid3, make QtWebKit catch up

qtwebkit-acid3

The Mac, Windows and Gtk+ port get 100/100 and pixel perfection for the acid3 test for quite a while but the Qt port was stuck somewhere else. How can this happen? For QtWebKit we decided to use as much of Qt as possible. So instead of relying on ICU we used the Qt Unicode support, instead of relying on libxml2 we used the QXmlStreamReader, instead of doing font matching and font/glyph caching we solely rely on QFont and QTextLayout to do the job. One had to apply some minor fixes to the Qt version of classes such as XMLTokenizer or TextCodec, or integrate SVGFonts into the Qt port as well…

What is next? We will have to get the rendering to be pixel perfect as well and then can merge the changes chunk by chunk. I’m going to sleep now, enjoy the screenshot.

Driving a car to Eindhoven

Driving a car to Eindhoven

What an exhausting day. It started nicely with watching “A hitchhiker guide to galaxy” and finally “Brazil” (I wonder how the two Central Services employees map to our admins and if they will have the same faith…). Then a short nap was taken, some breakfast and the journey began.

The mission was to drive a 1984 mexico beetle, with none working flash lights and probably non charging battery, from Berlin to Eindhoven. Surprisingly nothing went wrong with the car, the engine started after each stop, due the heavy rain we managed to miss an exit and took a roundtrip over Arnhem. It was a pleasant drive and it is fun to drive old cars… now back to hacking.

Releasing Software to the wild

Releasing Software to the wild

So what should one do on 08.08.08? Get married? Get divorced? Or the thousands of things in between? Openmoko picked this day to release the 2008.8 software update (code named A(pril|ugust)SU) and I will travel to Mechelen to catch up with some friends from foreign countries.

Let us take a small look at the release. Doing this in the Good, the Bad and the Ugly (Queen) style. But keep in mind Bad and Ugly are only there to be fixed, so this part is actually there to keep good engineers happy and focus on constantly improving by turning the Ugly into Good for the next release…

The Good
During the last six month I have added features and fixed bugs in our bootloader, kernel, xserver, enlightenment, distro and tried to punch the Qtopia parts we use into shape (Qtopia gave me so much wonderful real world examples for our Software Engineering class at the FU Berlin… *lovely*). So I’m really happy as all of these things I have created during that time are under Free Software licenses from day one! I’m also glad to have worked on all these different areas. It is fun to start in an application bug, go down to the kernel, hardware and back to user space.

Erin, Matt, Olv, Jeremy, John, Julian, Tick of Openmoko wrote code that is shipping in the Om2008.8. So this is the first release where our taiwanese friends at Openmoko started projects or contributed to projects that are used to power our hardware. John is an upstream OE contributor, Matt is our local kernel guy and Linux contributor, Tick is maintaining opkg (that o-hand.com helped to create) and is also maintaining the packagekit backend for opkg. We are slowly breeding Free Software contributors, explaining them the need of asbestos underwear. I’m totally excited as this is just the beginning.

We have started to focus on making our phone usable. This means we will integrate working solutions where they are available, we will improve them where possible, we will create new solutions were required. So we have picked connman and patched it, we have started FSO because there is nothing else.

We have worked towards the goal to make our hardware usable as primary phone. We have established our wonderful QA unit that systematically tests our software, PM and QA sit together and talk about the issues, the state, the way to go, sometimes the QA room is even crowded with engineers trying to pinpoint the issue. A wonderful improvement over what was there before.

Our kernel, u-boot, X is a lot more stable, suspend/resume can be almost trusted (well I know how to kill it…). We started to work on performance glamo waitstates, hardware ECC…

We have a support list and a workflow how to provide upgrades to our users

I use it as my primary phone and work hard for the day that my mom can use it just as she is using kubuntu today.

The Bad (keep in mind this can be changed and will be changed)
I had difficulties following the WebKit development and more difficulties reviewing and writing patches. So the next weeks I will wait for the ASU bugs to queue and focus on reviewing patches, SVG and acid3 for QtWebKit.

There are many reasons why not to use the Freerunner and our software update as primary phone. Our wifi driver has issues, our kernel has issues, Qtopia still has fundamental issues, our modem is giving us a hard time, the battery lifetime could be a lot better, the boot time is incredible long.

We should focus on delivering a good polished product. Currently the bootloader is initializing our graphic chip, the kernel resets, we see a white screen for awhile, init shows an init screen, black as X is starting, e is starting an init screen. So the bootloader, kernel, system level, X, WM guy need to sit together and make that smooth, no mode switching, sane handover…Software and Hardware people will have to work together, hand in hand. Stop thinking of boundaries, approach the people you depend on, also approach the people that depend on your work. Be a universal person and don’t be afraid to touch the kernel, it is just a C program anyway. But then again I have high confidence that this will happen.

I love the peopleware book and recommend it to everyone. It is an absolutely must read. Too many of our engineers worked overtime during the creation of this product. We will have to force people to leave the office early.

We have to get our stuff upstream. We have cool u-boot patches, we have s3c244x linux patches, we have kdrive/x patches, we have some OE patches, we have stuff to propose to freedesktop.org for virtual keyboard handling. In the future we should try harder to get our stuff upstream from day one. We should have the resources after the release to do so. It is something that we have to do now.

The Ugly
Oh well, QA asked us to not release due the stability issues they see during their heavy testing. We do not meet the quality standards our QA team has for an ordinary phone (the good thing about hiring someone that didn’t know Linux and Free Software). On the other hand they didn’t see the OM2007.2 factory image. I think OM2008.8 enables a Freerunner to be used in friendly user trials, maybe OM2008.8.1 will make QA more happy. Until then we will release ealry and release often.

I hope you enjoy the upcoming release, I do, happy hacking

z.

ASU and Gtk+

ASU and Gtk+

Openmoko dropped Gtk+? I hear a lot of people saying Openmoko dropped Gtk+ or that ASU will forbid to run their favorite Gtk+ or other X11 apps. So let us take a look.

The facts are that the ASU image has gtk+ installed, we even have a GPE application (gpe-scap) in the image, we have the OM2007.2 theme installed, we start the matchbox settings daemon so that Gtk+ application pick up the theme, fonts and sizes as used to from OM2007.2, gconfd is running as well. With our SDK people can write Gtk+ application, we are happy to include them in the community repository. Personally I wouldn’t say that we dropped Gtk+. I’m a huge fan of GMAE (eds and various other technologies) and I hope we increase the use in future versions of our software stack(s).

Is everything fine then? Probably not. We have no API for external applications (be it Qt, Gtk+, EFL, FLTK…) to access the GSM functionality. We have some basic ad-hoc dbus interfaces to export some information but no complete API. The good thing is we know and this is where the Platform Initiative jumps in. So the issue will be solved but not for ASU.

In contrast to previous incarnations. We have an installer application. It is called assassin and it is using packagekit (another component from the GNOME universe). We have a community repository and the installer will help you to get your favorite apps installed (whatever language, toolkit or scm they use…). Currently only tangogps is contained but I hope we will offer more community software in the future.

So I’m quite happy with ASU. It will allow you/us to use the Freerunner as primary phone. You will be able to install any 3rd party application, we provide a graphical installer. So even when a lot of things are still missing, we don’t have the bling bling we would like to have, we don’t have the speed we would like to have. It is an important step for Openmoko. We will work on every single issue that annoys us engineers (boot speed, X performance, device management, bling bling….) and turn it into something we are proud of. Time will tell if we manage to do so.

happy hacking

News from neo land

News from neo land

Basicly we have been busy with the ASU. I have a mobile phone contract now with a GPRS flatrate. This means I turned my neo into a router. Installing iptables and the various netfilter kernel modules, enabling forwarding and masquerading and thinks started to work. I would be interested in creating a special image with a GUI targeted for routing. Route everything out over GPRS and WiFi and allow to connect via usb and bnep. Or do it the other way around. Have some fancy GUI that allows you to configure the direction you want to route/masquerade…Sounds like fun.

The distro work continues. We continue polishing and now install the settings-daemon and the moko theme in the ASU. So if you install OM2007.2 apps or any other Gtk+ apps they get the right theme. Gtk+ has always been installed in the ASU images and it keeps being installed and now apps look right too. So guys be happy.

regina from our QA team is starting to test the Qtopia apps and I have fun fixing the various bugs she is finding.

and last but not least. I will be in Taipei the next couple of weeks, so if you are interested in talking about various things drop me a mail.

Code Cloning an example

Code Cloning an example

Some parts of code cloning are bad. In contrast to my other post this is supposed to be entertaining and something you can do before breakfast. Find the difference yourself and draw the conclusion. This code is from qmailstore.cpp from the qtopiamail library. This is not to pick on any developer at Trolltech but to highlight how code review and discussion could create a better Qtopia product.

    d->checkComparitors(key);

QString sql = "SELECT id FROM mailfolders";

if(!key.isEmpty())
sql += " WHERE " + d->buildWhereClause(key);

if(!sortKey.isEmpty())
sql += " " + d->buildOrderClause(sortKey);

QSqlQuery query = d->prepare(sql);

if(query.lastError().type() != QSqlError::NoError)
qLog(Messaging) bindWhereData(key,query);

if(!d->execute(query))
qLog(Messaging) checkComparitors(key);

QString sql = "SELECT id FROM mailmessages";

if(!key.isEmpty())
sql += " WHERE " + d->buildWhereClause(key);

if(!sortKey.isEmpty())
sql += " " + d->buildOrderClause(sortKey);

QSqlQuery query = d->prepare(sql);

if(query.lastError().type() != QSqlError::NoError)
qLog(Messaging) bindWhereData(key,query);

if(!d->execute(query))
qLog(Messaging)

The Myth about a working Qtopia

The Myth about a working Qtopia

One comment to my previous post was why Openmoko isn’t using the plain Qtopia as it is just working. I wonder why and how some people and groups can deny reality in such a way. I met and read a lot of people thinking the same about Qtopia and I wonder what is wrong? I have to fix general bugs day-in and day-out, every time I open a sourcefile I go WTF and I could probably talk a whole week about Qtopia bugs, bad engineering practises employed and group thinking. It is not the single bug that makes Qtopia unusable, it is the amount of them, it is the severity and the fact that most of these bugs are conceptually and are repeated all over the sourcetree.

This goes from explaining that C++ needs destructors to actually free memory (no kidding, libqtopiapim didn’t free its private data), that you have to normally use delete when you created an instance with new (no kidding, addressbook.cpp is a good example of code cloning with variations and leaks). Just by these class of bugs I know that the Qtopia developers don’t use valgrind to find unitialized data and leaks. Just run your automated tests under valgrind and check the leak status. I assume they might fail as the execution is slower and your assumption on timing is breaking like on a real device but that would be good to fix anyway.

But why do I think Qtopia is not just working? The AT Command set for GSM is specified in chapter 07.07 of the GSM spec. The AT Commands and the response (parameters and possible values) are specified there. By default GSM is using a 7-bit alphabet, some responses specify a different coding scheme and some responses like SMS have a different format (PDU) which is specifying encoding inside the binary data. You probably can guess where I want to go. So sticking the 7-bit result into QString::fromLatin1 is going to work for English but not for other languages (e.g. Spanish and German). At least SMS, addressbook, and CUSD (e.g. asking your provider for the balance of your prepaid SIM card) will not work correctly if you use your native not english language. This means I will have to go through libqtopiaphonemodem, look at the parsing routines for AT command responses, open the manual, check which parameters they omit from parsing, which encoding to use and fix that.. By any definition this is not Code Less, Create More, this is not adding value for any user of Qtopia and being asked to buy Professional Services from PSO to get a working libqtopiaphonemodem is not making it any better. Not many “customers” will like that. Qtopia 2.0 should have gotten this right, 2.1 should have gottent this right, 4.0, 4.1, 4.2, 4.3 all should have gotten this right, and according to the support it is unlikely that Qtopia 4.4 will have this right. This means Qtopia Phone is not working for the majority of people.

So what went wrong? A lot probably ranging from people to bad API decisions (okay API is done by people as well). The implementer didn’t carefully read the GSM 07.07 spec and missed handling of encoding. Well, this is natural, humans make errors, he probably did not know GSM before starting the implementation, so this was a good prototype (throw one away). Nobody reviewed the code, I think code review is really missing on the Qtopia code (I have many funny mistakes that should be easily spottable if someone would review…). Nobody is using Qtopia Phone with their native tongue, using it at all(?), e.g. if Qtopia would be developed in Norway or Germany, I’m pretty sure this class of encoding issues wouldn’t exist. You have to eat your own dog food, you really have to eat your own dog foot. You can not develop phone software from 8-5 and go home and use your blackberry. The testing team failed as well. They should have had test cases that make you send and receive SMS with Farsi, Spanish, German, Japanese, simplified chinese…, make you store these names on your SIM card, make the phone simulator emit non english text. And the API is to blame as well. QAtUtils should not have parsing methods that return a QString. Once you have a unicode string you forget to convert. GSM is 7-bit or 8-bit, stick these things into a QByteArray. Everytime you need to convert this into a QString to show the value to the user you should be forced by the internal QAtUtls API to consider which QTextCodec* to use for that.

So how is this issue no fixed (frequently got wrong by some people…)

  • Having a QTextCodec for GSM but not using it.
  • Having non english speakers in your organisation. Just having them doesn’t
    fix it. Having a developer capable of tamil and making him work on networking
    stuff doesn’t fix text handling and rendering of tamil. No kidding.
  • Denying the issue exists (it works here ™).

Not all hope is lost with Qtopia. Someone needs to stop adding new buzzwords to Qtopia and fix what is there. Increase the quality, make customers happy. I know that I don’t make myself any friends in brisbane with this, but someone needs to stay the truth. time for pizza now…

My two cents on the Openmoko April Software Update

My two cents on the Openmoko April Software Update

I have been involved in this project with the goal to create the April Software Update (ASU). Just by the name Update one can guess that the stuff shipped (factory image) on the image is not the April Software Update. The default factory image, for what I know, is the Gtk+ based stack as you know it.

So why did we start to create the ASU? We wanted to have a working phone on a short time frame and some of us believed that the current stack, specially the gsmd, is not close to be working properly. The most promising alternative was the Qtopia stack. So we started marching into this direction by porting it to Qt/X11. When I say Qtopia we mean the prediction of the keyboard, the dialer, the sms program, the various other phone apps. So I’m using my ASU powered gta02 as my primary phone and fix the issues I encounter where ever they are. There are quite some things left but it is looking promising. So guys, be happy that you will getting working hardware and working telephony software. If you are bored with stuff just working ™ the Gtk+ based stack is awaiting your patches.

So how does it fit into the platform strategy? This is not changing anything in regard to GNOME Mobile and Embedded (GMAE). Our SDK will support you in creating GMAE based applications. Our framework initiative will make sure that you can access the functionality you need. Due technical issues (before it would get political) our SDK will not contain Qtopia headers, libraries. The Gtk+ stack remains supported, patches are welcome.

So happy hacking and enjoy a working phone and more on how great EFL later.

z.

DVB-H with a Nokia SU-33W

DVB-H with a Nokia SU-33W

Dear Free Software loving Nokia,

first of all congratulation for acquiring Trolltech. You have gained a great team of highly motivated and passionate people. Many from us in the Free Software and OpenSource community care a lot for Trolltech. Recently I have acquired something as well, the money was not enough for all of Nokia so I started with getting a Nokia SU-33W. This is a bluetooth based DVB-H (Digital Video Broadcast for Handhelds) receiver.

While I know a lot about mpeg transport stream, multiprotocol encapsulation (MPE), FLUTE, OMA BCAST, RTP, h264 and have seen quite some DVB-H/DVB-T chips, I’m unable to make any use of my acquisition because the bluetooth protocol (directly on top of L2CAP) used is not documented.

Please give me access to the protocol specification to allow me writing a Free Software driver for your bluetooth device as I would like to watch TV with a HTML5 Video Element inside a QtWebKit KPart.

Looking back at Guademy

Looking back at Guademy

I have attended Guademy 2008 in the beautiful city of Valencia this year and presented a talk on WebKit and the Qt integration, produced some demos showing to embed QWidgets and QObjects into the QWebPage and how to interact with it, my other talk was a look at Qt 4.4. While preparing the slides I was in a constant wow mode. It is incredible what the Trolls added to Qt 4.4. It was probably a bit too much but it highlights what a team of excellent programmers can achieve when they focus on a common goal. Qt developers keep on rocking!

It was nice to catch up with some of my fellow KDE developers, see some GNOME developers, talk with local developers. I think events like the Guadec are really helpful, not only you can catch up with developers from your village, but also to see people from other villages and projects and discuss and get inspired. It inspired me to give KDE4 a try, fix some bugs, write a mail (which is still in the moderation queue) to kde-devel on KNumInput.

So whatever you want to develop Guademy into for the following years, make sure to keep it a place where people from the different desktop and non-desktop Opensource and Free Software projects can come together and talk to each other. There are things GNOME can learn from us, there are things we can learn and should learn from GNOME. I sincerly believe that whatever makes GNOME and KDE different we have more in common than what separates us.

So thanks a lot for organizing Guademy, your hospitality and see you next year.

PS: Because Jos asked, blogger.com works in the demo browser, this post is created with it.

© 2025 Strong Leaf