Tuesday, December 29, 2009

Users and lusers

I'm starting to get fed up of lusers that think they have the right to insult developers, use bad wording and in general being totally non respecting for the work other human being is going for them for free.

This kind of weird individual also thinks that by using bad manners its problems will be fixed more promptly, sorry but no, this is not a bar fight and being the rudest won't get you anything else than ignorance even if your bug is genuine.

I will not point to any of their posts, there have been too many lately, it's easy to recognize them and they know who they are.

At the contrary I will link to a mail by Jochen Trumpf so you can all learn how people is supposed to comment and contribute, in a clear, precise and constructive way, and as Thiago always says "If you got a patch it's much better", but if you have not it's ok too. To all lusers out there, please learn from Jochen.


Today i realized how much Windows sucks at consistency, here a screenshot with 3 screen decorations of three programs made by Microsoft itself (Visual Studio, Outlook and the command shell), notice how the decorations are different in the three and also notice the colours are different in the three even if all of them are inactive windows.

Friday, December 25, 2009

Making okular the default program for tiff files?

https://bugs.kde.org/show_bug.cgi?id=219326 is a request to make Okular the default viewer for TIFF files based in that it seems that now the default TIFF viewer in KDE is kolourpaint and it doesn't support multipage tiff files.

Comments? Should we change it?

Sunday, December 13, 2009

Calling Frisian KDE users

If you are using KDE in Frisian (fy) take a note that the team is currently having problems to fulfill the essentials to be released with KDE SC 4.4 and you should join them to be able of using KDE in your language. If you want to help mail me at aacid kde org and i'll tell you more details.

Of course this offer is extensive to most if not all KDE translation teams as more helping hands are always welcome. If you are a user that doesn't know how to code help translating and you'll be able to say

Sunday, December 06, 2009

Compiling virtuoso-opensource-20091109 in Fedora 12

If you are trying to compile virtuoso-opensource-20091109 in Fedora 12 and are getting error messages you might try adding
#define STACK _STACK
at the beginning of libsrc/Dk/Dkernel.c and libsrc/Wi/http.c

Ugly but worked for me :D

Friday, December 04, 2009

Friday, November 20, 2009

Nokia Certified Qt Developer

So i just got a mail saying i'm now a Nokia Certified Qt Developer. Great!

Tuesday, November 17, 2009

Beware of QDomElement::setAttribute with floats and doubles

QDomElement::setAttribute with floats and doubles formats the numbers according to the current locale as specified by the documentation and this is for sure going to bite you. It did for us in Okular where people lost annotations when moving from one computer to another since the user was using a , locale in one of them and a . locale in other.

So if you use QDomElement::setAttribute with floats and doubles just add QString::number to the second parameter or as Thiago suggested switch to QXmlStreamWriter

Thursday, November 12, 2009

Moving to Dublin

Some of you may already know, but probably most don't.

I will be leaving my home city of L'Hospitalet and moving to Dublin the second week of December.

This is a huge change for me since I'll stop living with my parents and live on my own for the first time of my life, also in a place where they don't speak my mother tongue, so it's both scary and motivating.

This also means I'll probably have less time for KDE since I'll have to do the boring real life cleaning/cooking stuff i don't do at the moment so you all will have to live with less bugging about "const &" by me.

It's been a very interesting year working with the cool dudes at Miraveo and i really wish them luck for the future but the company i'll be working for had a monetary offer i could not really refuse without trying to see what they do have to offer.

BTW I'm not saying who I'll be working for because the papers i signed said so many things i don't really know if i can say who I'll be working for, so don't ask.

Interesting times ahead.

Wednesday, October 28, 2009

KPovModeler looking for a new maintainer

Andreas Zehender is stepping down as KPovModeler maintainer so if you want to introduce yourself in the world of 3D, Qt, KDE, et al, working on KPovModeler will surely be a good experience! Don't miss it!

Monday, October 26, 2009

Jargon is bad

Aaron was talking the other day on how using jargon is bad. The real problem is how to know if a word is jargon or not.

Example follows:

Yesterday my grandmother was bit by something she qualifies as jargon. She bought a new printer, one that can hold xD cards inside and print directly from there, when plugging the xD card she was told by the printer LCD "Do you want to format the card? Formatting the card in printer format will make it faster bla bla" and, she answered "Yes", and all the photos went to the heaven of photos.

The problem here is that we all know formatting means erasing, killing, vanishing the contents, but my grandmother did not. So should "format" considered jargon? Or maybe we should keep using format but on the confirmation question mention "erasing" too?

Sunday, October 25, 2009

Okular Junior Job: Kill qApp->processEvents() from fontPool::locateFonts

The title says it all, fontPool::locateFonts, part of the DVI backend (generator in Okular jargon) is using qApp->processEvents() and that is baaaaaad. The code is located at kdegraphics/okular/generators/dvi/fontpool.cpp and it should be straigh forward to port away from using processEvents to a signal/slot mechanism.

Interested people please drop by the #okular channel on freenode or to the okular mailing list.

Thursday, October 22, 2009

Another free software kernel

Symbian just made their kernel Free Software so if anyone is interested in real time, multitasking, SMP-ready kernel that is in use in lots of phones, you have something to hack on now :-)

Friday, October 16, 2009

Gluon sprint + QtDevDays

So last few days i've been in munich for the Gluon sprint and the Qt Developer Days.

Before starting my summary i want to thank the KDE e.V. and Qt/Nokia for paying the trip to Munich, the accommodation, letting us use the Qt/Nokia offices in Munich, giving us free entrance to the DevDays and also free opportunity to do the Qt Certified Developer Exam (easy if you are a seasoned KDE dev i'd say (hope i pass it :D)).

That said, lets start :D

Gluon sprint started friday at 10pm for me when i got to our hostel, there i met with Sacha and Sandro, had some drinks and went to sleep waiting for the next day.

On Saturday, HarriF from Qt/Nokia picked us up in our hostel and guided us to the nice offices Qt/Nokia has in Munich, there we started some presentations about gaming creation IDEs so all the participants of the sprint could see the idea of what Leinir wants for Gluon Creator. Mid-afternoon, Knuth joined us and cared for us for the rest of the day, even getting us some food for dinner when the waitress was hesitant because it was already late.

On Sunday we started to do some work involving designing, refining of classes, creating d-pointers for classes, improvements on some classes to make it more easy to be cross paltform, etc. HarryF joined us for a while and he got himself parts of the sample gluon game (Blok) working on the Mac, cool stuff.

Monday continued with work on Gluon stuff with fregl, karli and SaroEngels joined us due to the proximity of the DevDays. The very monday afternoon we headed to the Hilton where the welcome reception sponsored by Tieto. A company that was the Platinum sponsor of the event, that said to have lots of Qt experience but whom i had never heard of. They were actively showing plasma on the S60 emulator, no idea if they have anything to do with the plasma port to that platform, if they have not it's a weird thing to show.

Tuesday was DevDays talks start, it all began with Nokia VP for Qt speaking of the Qt Everywhere idea (we had a Qt-based coffee machine :D) which includes everything you can think of except the iPhone and Android (some conflict with Nokia interests?). The starting video showed Marble and KDE screenshots, nice touch :-) Lars spoke about the next generation of Qt followed by Walter Bender talking about Sugar, that uses pygtk and when he asked if Python Qt would be supported he got a no, there's some company called riverbank that does it but Qt/Nokia does not do it. I wonder what happened to PySide that not even Nokia employees talk about it... Then ¿our own? Matthias Ettrich came out to the stage with a laptop with a huge KDE sticker running Ubuntu and spoke about the Declarative interfaces thing, cool stuff, but mostly for the smartphones i'd say, also it is bad that it won't respect native style of "widgets".

After lunch talks continued without anything worth mentioning except the shameless plugs for QtCreator in each of the talks (guys we know it's not a bad tool, no need to say "look what it does, it's cool") and the unprofessional way of referring to the iPhone as "the phone from the fruit company" and Android as "the robot from the ad company". Grow up.

Then we headed for the 15th floor for some drinks while the rooms where prepared for dinner where the Fact or Crap Quizz Contest was held, my table (the gluon team table) was just 1 correct answer away to qualify to the final, so close to those shiny phones....

Next day i attended some more talks about features that seem specifically developed for smartphones (gestures/animations/stateMachine) and also two KDAB given talks, one about Multithreading by Mirko (with some Steven Seagal resemblance) and Qt Kwan-Do by Mirko and Till.

All in all a very nice experience, more suit-y than Akademis but still nice to see that much people attending a Qt meeting, being the largest Nokia developer oriented event this year.

And last but not least, Sandro is luckiest man in earth, he won two consecutive raffles, take that statistics :D

Thursday, October 15, 2009

Thanks to git people

git 1.6.5 was released a few days ago including the quiet flag for pushing. Now our l10n logs will look less messy without all those "Writing objects %" lines. No idea if it was because i'm from KDE or not, but git people were very helpful and implemented my request quite fast. Thanks!

Monday, October 12, 2009

Dear lazyweb: intel graphics problems

Here i am trying to open a svg file with inkscape and i get this.

Any idea what can be the problem? Fedora 11 uptodate with Intel Corporation 82852/855GM Integrated Graphics Device.

What a sprint can do for you

Today is the last day of kdegames/gluon sprint, and it's being quite productive as you can see on http://gitorious.org/ gluon is now in the Most Active projects list gluon-team is in the Most active teams list.

Of course this is powered by my powerful sitting on chair skills :-P

Wednesday, September 23, 2009

poppler-data 0.3.0 released

I've just released a new poppler-data package based on the new free cMap files by Adobe. This now makes poppler-data a free package so you should go and bug your distro to install it by default.

Monday, September 21, 2009

Projects: be open or die

So i search for poppler on google and find http://www.linuxfromscratch.org/blfs/view/svn/general/poppler.html a page from the Linux From Scratch project that mentions how to build poppler. I spot a couple of factual errors there and after some searching i see i have to mail lfs-dev@linuxfromscratch.org which i do.

After an hour or so i get a mail saying my mail has been rejected to enter the mailing list.

After querying the admin of the list i get "IIRC, you are not registered with the list." That's it, not a "please for bugs use thisOtherService this list is for core contributors", not even something like "Please register, we prefer people to do so it makes sure follow ups are not lost", nothing.

So good luck with the project, if you don't want to include fixes it's up to you, but you should make contributing easy otherwise you'll end up with no incoming people and you'll project will die sooner or later.

I'm glad KDE community is generally more welcoming than that.

Wednesday, September 16, 2009

Qt for S60 not as cool as real Qt

Ok, Qt for S60 *is* real Qt since it was merged in mainline Qt not too much ago, but it still has lots of things that make it not the very good toolkit we are used too. For example Qt 4.6 in S60 will have a QFile that won't support unicode names in files. :-(

Monday, September 14, 2009

KDE in Barcelona Software Freedom Day

This 19th of September is the Software Freedom Day. As every year Caliu is organizing the event in Barcelona, this time at the Centre Cívic de Les Corts, from 10 to 20h. Aleix Pol and me will be there with a KDE talk at 15:00.

Tuesday, August 25, 2009


So yesterday i finished reading 1984, a book written in 1949 about a future 1984 where the world is divided in three mega countries in permanent war. The book talks about Winston Smith a mid-level member of The Party, the dictatorial organization leading one of those 3 mega countries, and how he hates the establishment and how he tries to subvert the system. It also features "telescreens" a fictional two-way camera/television that sees everything and controls everyone.

The book is the first Orwell novel i read (though i read an adaptation for kids of Animal Farm when i was younger) and i found it rather interesting and as a classic in science fiction i think you should read it. The topics it covers are still up to debate: Are "low level classes" with less problems happier than people that know more? Do revolutions just mean changing who is in charge but "exploited people" remain in the same situation? Is government surveillance a good thing? Is torture a valid method to achieve government objectives? Is true love a thing that can not be destroyed?

How not to do a poll

Today i was traveling on the TramBaix back home and noticed a leaflet that said "Imagine the new Diagonal", that said the city council wants to reorganize the Diagonal (one of Barcelona's most important avenues) and wants the citizen feedback. I'm a good citizen so i read the first question, it says:
The Diagonal should be:
a) A space where neighbours and citizens can meet and walk
b) A space to travel using public transport
c) A space to have shops
d) A space with green areas
e) A space for traffic, but with less private cars than right now

And then i saw it made no sense keeping reading, all of the answers are targeted to what the city council wants, so whatever you answer, they will be happy, there's no answers like (not that i agree with them)
x) A space for traffic, but with more space for private cars than right now
y) Remove the TramBaix, it's useless

So basically this is a sham, a fake poll and whoever did it should be ashamed, but it seems we are in a time were politics are not ashamed anymore of any kind of wrongdoing and citizens don't seem to care much :-/

Sunday, August 16, 2009

Trobadour knowledge about QGraphicsScene

If you do not want your QGraphicsView to repaint itself totally do not delete QGraphicsItems without removing them from the QGraphicsScene first.

Thursday, August 13, 2009

Is the X11 engine slower than raster just because of the drivers?

Here was i profiling KSquares and discovered that when painting an antialiased dashed line using the Qt X11 engine you hit a code path in which Qt tries to detect for each dash of the line which other dashes intersect with it, that's right a O(n^2) calculation that makes no sense, that since you are drawing a line the intersections it will find it's that a dash only intersects with itself. So seeing things like that i wonder if the Raster engine is faster because X11 drivers suck we have been told or it's that the X11 engine code is not as good as it could be. I've checked and the raster engine has no such "bad" loop

Friday, August 07, 2009

Even more symbian woes

Symbian has pthreads support, but it sucks, yesterday i discovered it has a maximum number of threads you can create, that is

void *dumb_thread(void *)

pthread_t t;
int error = pthread_create(&t, NULL, dumb_thread, NULL);
pthread_join(t, NULL);

will end up returning error 35 (EAGAIN) in pthread_create after some calls, depending on the phone it can be 20000 or 60000, and yes, that's a lot of threads, but if you are using threads for fire and forget jobs it's relatively easy to hit that number, so i've been forced to implement a thread pool just to workaround yetAnotherSymbianBug.

And yes, this has nothing to do with KDE, except that the more i code in Symbian the more i appreciate the rock solid API provided by KDE and Qt

Monday, August 03, 2009

Symbian stringstream woes

Here i am, wondering why the hell Symbian code is so bad after all the years that have passed since it was created. I was bitten by the "select() memory leak" bug some months ago and now i've been bitten by the "stringstream is not thread-safe" bug. One wonders if such simple things fail[1] what more can be hidden in the deeps of the Symbian code, i think it's time for the Symbian Foundation to open up the code already.

[1] Ok, actually the "select() memory leak" got fixed (or so i was told) after i reported the bug in the Symbian Foundation bugzilla and the "stringstream is not thread-safe" seems to be fixed either in the OpenC/C++ 1.5.5 beta that can be dowloaded from the trolls site or in the new firmware for the N78 (can't tell which one fixes things as i updated both)

Saturday, August 01, 2009

Help translating KDE

KDE has a strong translators community being one of the most translated software all around but as all areas of [Free] Software development the more people helping the better, so you should consider going to http://l10n.kde.org/teams-list.php and contact the team of your language. In case the point your team is marked as inactive or the contact for your team does not answer, you should contact the general list for KDE i18n where we'll give you further guidance.

"Why should i translate if i already understand english?" will you ask yourself. There is no definitive answer to that but i can give you two reasons:

  • As any contribution to Free Software will make your karma go up and you'll be part of something BIG

  • It will help you improve your english and your native language knowledge. That's because most of the times you understand english enough to understand the sentence, but transforming it to correct native language in a semantic and sintatic way is not always simple so you end up improving a lot both your English and your native language skills

As i said all languages need help, but the ones of this list are more in need as their former translators don't seem active anymore: Afrikaans, Albanian, Armenian, Azerbaijani, Bosnian, Breton, Chinese Hong Kong, Croatian, Dzongkha, Esperanto, Faroese, Igbo, Indonesian, Kabyle, Kikongo, Kinyarwanda, Kirghiz, Kiswahili, Lao, Latin, Luxembourgish, Malagasy, Maltese, Maori, Mongolian, Nepali, Occitan, Pashto, Persian, Swati, Tamashek, Tatarish, Tibetan, Tigrinya, Urdu, Uzbek Venda, Vietnamese, Welsh, Xhosa, Yoruba, Zulu

Monday, July 27, 2009

Twice a FIBer

So after studying at Facultat d'Informàtica de Barcelona (FIB for short) last week i attended Festival Internacional de Benicàssim (FIB for short) so i can say i'm a double FIBer now. Bad jokes aside, i want to recommend anyone that has never attended a music festival yet to do so (if you remotely like the music played on it) being on one is an experience you have to live (singing a song together with 100K people is HUGE), maybe at the end you decide you don't want to repeat it, but i'm sure you won't regret being in at least one.


wcgrep is a script from the subversion dudes dfaure copied to kdesdk/scripts that greps ignoring .svn directories, you should be using it for your greps!

Wednesday, July 22, 2009

KDE 4.3 Release Dinner at Barcelona

Following the tradition of doing release meetings the Barcelona KDE crew is meeting for dinner this friday (yeah damn the release team for postponing the release), if you want to join us head to http://cat.kde.org/index.php/Sopar_KDE43 FAST!

Saturday, July 11, 2009


So i had planned to do blogging each day but at the end there's too many interesting things going on at the same time to get time to write something down.

GCDS has already ended and i'm waiting at the Fataga hotel hacking area with other barcelona fellows until late as our plane leaves at 00:05 of tomorrow.

Let's try to summarize a whole week of GCDS :-D

I have some new gear now: Kubuntu, GCDS and KDAB tshirts and a Qt towel

Keynotes where rather interesting, RMS speech had as expected some Mono bashing, Sugar shown us a different way of having a Desktop Environment, Quim Gil told us that Maemo was switching to Qt as GUI toolkit and Robert Lefkowitz told us we use Free Software not because it's better, but because we are gentleman and he convinced me :D

Then we had the cross-desktop lighting talks that started with Frank Karlistech announcing Open-Pc project and followed with lots of other fast talks not really cross-desktop but one of each

Next day i attended some more so-called cross-desktop talks and sadly most of the focused only on one of the two projects, i think i managed to be quite equidistant in my poppler talk but maybe i wasn't :D

After day Akademy started with a nice keynote telling us that Free Software will save the world, we rock! Then we had the IDE battle with KDevelop and Qt Creator, Qt Creator requiring you to grant Nokia a commercial license so that they accept your code makes it the loser in my book. Then GAmaral talked us about KDE in Mexico and Knut introduced some students that had been working on Qt.

Nokia payed us a nice party that night in the harbour

Next day we had Akademy too, i attended talks about Qt graphic things, improving productivity, improving design and improving git for Qt and KDE.

After lunch, Sebastian did a keynote on our own future followed by dfaure telling us how to fix bugs faster and Olivier doing the same talk i had prepared for Akademy-es :D After that i switched to the Business track with Till, Nikolaj, Bart and Frank telling us how to win money with KDE.

And finally Akademy almost ended with the Akademy Award ceremony, with three of the key people in our community awarded.

The real Akademy ending was at the basysKom party

From there all turned even more crazy, with KDE eV assembly, ereslibre and antlarr saving Behdad from dead (well just leading him to the hospital), KDE España assembly, bofhs, Akademy-es (more on that on the dot shortly) a trip to the beach with a bug in the transportation system, having Behdad explaining me how font rendering works, discussing about poppler with lost of people and yet another party this time sponsored by Collabora.

All in all i think the GCDS was ok, though as always with this kind of events there were several things i did not like much like people being spread on lots of hotels, having one auditorium room outside the main building with too much time travel to the other, having the travel agency (Viajes El Corte Inglés sucks!) kind of scamming me, the University being too far away from the hotel and Akademy-es being eaten by a too much bigger event, on the other hand having the possibility to meet some gnome people i needed to talk to was a pleasant experience even if it made it a bit more difficult to start talking with people at parties because maybe you spoke with someone that did not have much in common with you.

Monday, June 01, 2009

Okular, PDF and file permissions

There seems to be some controversy about how Okular handles file permissions (sometimes called DRM) in PDF files. I will put here my personal opinions (weird i have to say this since this is *my* blog so when i write here it's always *my* personal opinion).

As a note for those that don't know me much, i was KPDF maintainer from 2004 or so till it's death, mentored the SoC project that created Okular, a regular Okular developer and i'm also the maintainer of poppler since a few time ago, so well, i think we'll agree i know what i'm talking about ;-)

Let's analize the bug-reporter sentence:

"So what I want to know is: why are people putting code into Debian
that limits our freedom? Why are people putting such code into KDE?"

So he wants to KNOW why *we* did this, yet he mails Debian bug tracker. First weird thing man, we have the okular irc channel, the okular mailing list and the kde bug tracker, all this are MUCH BETTER places for knowing.

First question:
"why are people putting code into Debian that limits our freedom?"
is very similar to
"why is people coding in GPL that that limits our freedom?" from the BSD fanboys. It all boils down to your freedom ends where other people freedom starts. And someone freely decided he doesn't want you to copy his PDF, you may hate him for that, but it is his freedom, *his* license, and we all like people respecting our license (GPL) so we should respect others, or are we just going to respect licenses we like?

Second question:
"Why are people putting such code into KDE?"
because it's what the PDF specification says and we want to have a PDF reader, don't we?

Now, there's even a LWN article talking about it (sorry folks, you have to pay them to read that unresearched article), but i'll quote here a small part (under the fair quotation law i hope)

Applications which do implement this "feature" tend to disable it by default.

he means evince has it disabled by default and okular enabled by default? I don't see a "tend to" here

Perhaps this behavior is result of the relative newness of this application; as it accumulates more users, the pressure for more user-friendly behavior is likely to grow.

KPDF had the exact very same behaviour since 2005. And well, if Okular is not called KPDF in KDE 4 it's just because we decided to support more formats but for the rest it's the same program.

Linux, at all levels, has felt free to ignore standards when following them makes no sense.

Repeat with me Okular is not Linux, Okular is KDE, Okular runs in Linux, Okular runs in Solaris, Okular runs in FreeBSD, Okular runs in Windows, Okular runs in Mac OS X.

And now my final words. I hate DRM, i don't buy DRM enabled things (or try as hard as i can not to) BUT KDE is not the place to protest about that. The place to protest against that is with your wallet (don't buy DRM'ed things), with your vote (don't vote politicians that pass pro-DRM laws) or even in the streets in demonstrations.

Friday, May 29, 2009

A day in scam land

So i'm looking for two tickets for FIB now that tickets are sold out.

One goes to google and finds three announcements on craigslist, price is okaish so you contact the posters ... and all you get are scammers.

The first one says "please provide me this details asap so i can start this transaction asap through craigslist they will contact you", a mention to craigslist itself, this must be safe for sure, but then you go to craigslist and see a page that explicitly says that they don't handle transactions at all. The announcer does not answer back once i point her to this page.

The second and third announcements end up being from the same mail address, interesting as one announcement is from Barcelona and the other from London, one asks 400€ and other 380£. The poster says he is not able to meet me and Barcelona and neither an hypothetic friend of mine in London because "he works all day" (though answers my mails in 5 minutes). I ask him to post pictures of the tickets with a newspaper of today or the very same mail i just send and he just sends pictures of the tickets themselves. More over he says we'll do the transaction via "Ebay and Square Trade". If you look at Square Trade, they are not a transaction company at all either, seems someone is using their name to scam gullible people.

So basically it seems that yeah, the prices they were selling the tickets were "too low" and are just a honey pot to scam people.

I hate how the world is full of people that don't any respect for others at all. Meh :-/

Thursday, May 28, 2009

Your talk in Akademy-es 2009

You may that we are celebrating Akademy-es 2009 inside GCDS. If you did not know you do now ;-)

So if you think you have something to say to the Spanish community that will gather there do not hesitate to read the call for activities and submit one before the 8 of June!

We are waiting for them ;-)

Tuesday, May 19, 2009

Buenos Presagios (Good Omens)

So yesterday i finished reading Buenos Presagios the translation of Good Omens by Terry Pratchett and Neil Gaiman, a book written in 1990 and that has the Spanish first edition on ... April 2009 ... it's intriguing how some editorials decide to translate not so great books asap and better ones are left on the dust for almost 20 years.

And now onto the book, it's my first Gaiman book, but my n-th Pratchett one and i have to say it lives to the expectation.

It's a novel about the end of the world because of the Armageddon, the coming of the Antichrist, with the Four Horsemen of the Apocalypse, a witch that did 300 years of exact predictions and an earth-living Angel and Demon that prefer to work together instead of for their far away bosses. All that mixed with the great humour that Pratchett gives to all his books, will have to read some Gaiman to see if it's good too (Just saw he's the writter of Stardust, i haven't read the book but the movie was entertaining). The only thing i did not like much is that book ending is a bit weak in my opinion, but otherwise a very recommended book.

Monday, May 11, 2009

Poppler 0.11.0 (0.12 Alpha 1) released

Available from

WARNING: This is a unstable release, it is actually 0.12 Alpha 1 release, it should work like any release from the 0.10 branch, but do not blame us if it turns the sea into Coke.

Changes against the 0.10 branch:
* Add initial support for color management
* Remove case-insensitive matching of filenames in PDFDoc constructor
* Fix extraction of some ActualText content
* More work on Annotations support
* Improve font rendering in Cairo output device
* Fix bug in cairo backend with nested masks
* Fix cairo luminosity smask rendering
* Add optionally text support to Cairo output device
* Add the possibility of setting the datadir on runtime
* Return an error code instead of a boolean when saving
* Make the font scanner more versatile
* Small opimization in documents that use PostScriptFunction
* Minor optimization to Stream handling
* Fix some compile warnings

* Optional content support
* More work on Annotations support
* Improvements to the demo
* Documentation improvements
* Fix build when compiling with GTK_DISABLE_SINGLE_INCLUDES

* Support URI actions for Table Of Contents items
* Documentation improvements
* Improvements to the demo
* Add a FontIterator for iterating through the fonts of the document

* Allow the use of cropbox in pdftoppm
* Make pdftohtml output png images when the image is not a jpeg
* Make pdftotext accept cropping options like pdftoppm
* Support rendering non-square pixels in pdftoppm

build system:
* Require Cairo 1.8.4 for the Cairo output device
* Require CMake 2.6 when using the CMake build system
* Optionally require libpng for pdftohtml
* Optionally require libcms for color management

Testing, patches and bug reports welcome.

Thursday, April 30, 2009

i18n as second citizen in KDE

Sadly it seems that i18n (short for internationalization), that is, making your program available for non english speakers is a second citizen between KDE developers.

Programmers are treating bugs reported against i18n as non critical when effectively they are making their program unavailable for lots of users.

You may think this is a personal perception, but let's mention some examples:
* Plasma: Category names ("Application Launchers", "Astronomy") in the drop down box of the "Add Widget" dialog are untranslatable. Plasma developers excuse themselves saying i18n is not their best aptitude
* Places names are set after first use and don't follow the user locale https://bugs.kde.org/show_bug.cgi?id=177536
* KMail view names have a similar problem, can't find the bug number right now
* Places names for devices are not translatable http://lists.kde.org/?t=123937583500004&r=1&w=2
* Amarok: Items in the playlist layout editor are not translated https://bugs.kde.org/show_bug.cgi?id=189750
* Amarok: Default layout names are not translatable https://bugs.kde.org/show_bug.cgi?id=189751

These are just some examples, don't feel finger pointed if your app is here.

You'll notice that some of this bugs/reports have patches or suggestions on how to fix it, yet nothing has been done to fix them.

So please, don't treat i18n as second citizen, you *really* don't want to alienate so much users from your program.

Wednesday, April 29, 2009

Fix for broken hplip in Jaunty upgraded from Intrepid

If hp-toolbox fails to start for you with

Traceback (most recent call last):
File "/usr/bin/hp-toolbox", line 246, in
from ui4.devmgr5 import DevMgr5
File "/usr/share/hplip/ui4/devmgr5.py", line 45, in
from dbus.mainloop.qt import DBusQtMainLoop
ImportError: No module named qt

The solution is purging and reinstalling the python-qt4-dbus package

Tuesday, April 21, 2009

Book reviews

This week is Saint George's Day and in Catalonia it's typical to buy/gift books so i'm commenting over the fours last books i've read.

El Códice de la Atántida (Decipher) by Stel Pavlov: A Science Fiction book that carries the tag "Best Seller in USA and Italy". Well, i'm not going to comment on these countries taste for books, but this is a book you should avoid, it's a mix of Atlants, nanobots, armies, earth to be destroyed, misc adventures and all, but at the end i just had no interest for keep reading another page, and i just finished the book because it's what i do will all books.

Los hombres que no amaban a las mujeres (The Girl with the Dragon Tattoo) by Stieg Larsson: A noir novel, you should read it if you are not scared of a book were some pages talk about crimes on women being killed by cutting their head and putting it on the fire. It's a book i got addicted fast and could not stop reading it until the end. It features kidnaped girls, assassins, investigators and more important Lisbeth Salander, best good-evil character since Wolverine.

La chica que soñaba con una cerilla y un bidón de gasolina (The Girl Who Played with Fire) by Stieg Larsson: Second part of The Girl with the Dragon Tattoo. You'll have to read it after reading the first one, the story is less macabre than in the first book but as vibrating as the first one and involves some "I'm your father" Star Wars-like scenes that even feature everywhere still impacts the reader.

La verdad (The Truth) by Terry Pratchett: It's for sure not the best Discworld novel, but still worth a read, Pratchett can create jokes from almost everything, and newspapers are not going to be an excempion. In this novel a new character is introducted William de Worde that will try to do real journalism and investigate the charges of embezzlement and attempted murder against Lord Vetinari.

So all in all, don't buy Decipher, read Stieg Larsson books if you like noir novels and The Truth is just another Discworld novel, so it's of course worth a read.

P.S: Stieg Larsson books since to have a much more catchier name in Spanish than in English, wonder which is more closed to the original swedish though.

Saturday, April 11, 2009

How to make foreach loops that don't suck

Calling values in Hashes/Maps/Sets

QHash<QString,Plasma::Meter*> meters;
foreach (Plasma::Meter *w, meters.values()) {
  w->setLabelColor(0, theme->color(Plasma::Theme::TextColor));

This code is iterating over the values of a hash and doing something over them. Everything seems ok, but it's not, it's calling values() on the hash and that's causing the creation of a temporary list with all the values of the list, effectively causing a bigger memory usage and iterating over the list twice (one to get the values and other to do something over them).

You can write something that does the same without these two problems doing

QHash<QString,Plasma::Meter*> meters;
foreach (Plasma::Meter *w, meters) {
  w->setLabelColor(0, theme->color(Plasma::Theme::TextColor));

So if you are using values() in a foreach, just remove it and your code will be instantaneously faster.

Calling keys in Hashes/Maps

QHash<QString,Plasma::SignalPlotter*> plotters;
foreach (const QString& key, plotters.keys()) {
  plotters.value(key)->setShowLabels(detail == SM::Applet::High);
  plotters.value(key)->setShowHorizontalLines(detail == SM::Applet::High);

This is calling keys() over the hash, this, as values(), means going across the container and creating a temporary list containing all the keys of the hash, that's a waste of memory when you could simply use a proper
and just iterate keys one by one.

Then it does plotters.value(key) twice, ok, accessing a value in a hash is amortized O(1) but still you are going to calculate the qHash of the string twice for no reason.

But more important, what the code is doing is actually iterate over the values, so the proper way is doing

QHash<QString,Plasma::SignalPlotter*> plotters;
foreach (Plasma::SignalPlotter *plotter, plotters) {
  plotter->setShowLabels(detail == SM::Applet::High);
  plotter->setShowHorizontalLines(detail == SM::Applet::High);

Probably in this case the net benefit is not much because probably the number of element of plotters is small, but there's no need to write inefficient code when the efficient one is as easy to write.

And of course it could be worse. If plotters was a map instead of a hash, lookup would be O(log(n)).

So if you are using keys() in a foreach, please think twice what you are doing and if you only need the value, iterate of the container and if you really need the key use a proper iterator to avoid constructing the temporary list.

Wednesday, April 01, 2009

3 years and 8 months later...

...i got my University Engineering diploma. I wonder what's the reason for taking so much for printing a paper :D

The nice swindler inside Apple

Apple has just gone a step higher in my list of companies i hate. Let me explain my last experience with them.

So i am browsing the net and see there's an iPhoneOS 3.0 pre-release, you have to register, pay something like 80€ and then you are part of the developer program and can download the SDK. So as my daywork involves working with phones i decide to register and pay with my boss credit card, something i've done lots of times already and never had any problem with.

But seems Apple is special and needs the names to match. No problem, i can accept that.

What i can not accept is they charging my boss the 80€ and then denying me the access to the developer zone because names do not match. That's what i call a swindle.

And the even more wonderful thing is the people that answers my mails don't see Apple did anything wrong and is asking me to send a fax (to US that i don't want to know how much it cost) of my and my boss ID cards with a notary sign saying it's ok (i don't know elsewhere, but in Spain a notary is NOT CHEAP). And won't return the 80€ either. Wonder if the only chance is asking the bank not to pay that 80€ :-(

That's what i get for dealing with Apple :-/

Thursday, March 19, 2009

Transactions and rollback and their lack of in viajar.com

This post should be called "I'm going to Akademy! (i hope)", but instead of rejoicing of going for 4th consecutive year to KDE meeting, i'm going to do a rant about transactions and how rollback should work.

So here was I, sitting in my computer trying to find a good flight to go to Gran Canaria and ended up in viajar.com. They had a mixed offer (flight from Barcelona to Gran Canaria with one company and back with a different one) that was the best considering time and money so i went on and bought from them.

So i clicked the "buy" button after filling all the data and scared saw that the server was taking too much time to show me the "done" page. After 5 minutes or so, it told me "error", and i went like "oh, i'll have to find some other place to buy". But first i had a look at my credit card account and saw in horror that a the company of the second flight (clickair) had charged me about the half of the amount of money of what i had bought.

Calm down! I thought, and waited for a mail explaing something, but there was none for 12 hours so i had to call them. A nice person answered and explained me that they had absolutely no record of my purchase so they could not give me any info, i then explained the situation and she realized that clickair bookings are somewhat done differently from the rest because it's a Low Cost Company so she asked me which dates i had booked and promised to give an answer back.

Two hours later she phoned me with the needed data to take both flights as it seems she could book me also the first flight, good, all resolved!

But i was still wondering, how can the system book one ticked without checking the other one is available? how can i get a ticket booked and get no information back? Probably i went to the last if/else/if/else/if/else of conditions, but that's no excuse.

So if you are doing internet "shops" think twice your transactions and rollbacking mechanism, and then, think it a third time!

Sunday, March 15, 2009

NetworkManager settings not shared/specified?

Dear lazyweb, please prove me wrong.

I've been having a quick look at how NetworkManager is implemented and from what i see the public DBUS API is only for querying, not editing there. The edition of new networks et al is to be provided by a separate NetworkManager service that has no common API. This has two consequences to me:
* Users that edit/create connections under KDE don't see them under Gnome/Xfce/wathever and viceversa
* You can not write a desktop agnostic program that needs to modify/create networks as you don't know who you have to talk to <-- This is specially ugly

Wednesday, February 25, 2009

ddrescue to the rescue

So two weeks ago my HD did a huge CRACK and it stopped working. The system did not boot up and it just did CRACK CRACK CRACK all the time. So i browsed a bit and saw that ddrescue was a dd variant able to skip failing sectors. So i picked up a new HD the double size of the old one and a RIP CD and started the process of dumping the old filesystem into a file. Two weeks after ddrescue told me i had lost 77MB and thankfully after dumping the file into a newly created filesystem and some fsck later i did not lost anything important.

So thanks a lot ddrescue devels!

Monday, February 02, 2009

How to get Konsole 4.2 to behave?

Dear lazyweb: My Konsole in KDE 4.2 does not like me. Let me explain myself, i like to use vim for quick text editing and i like using the numeric keypad to type numbers, if i use the "Default (XFree 4)" input method, that doesn't work, and pressing any keypad number makes vim go nuts, so i'm using the "Linux Console" input method.

"Linux Console" works correctly when on a local session but if i log into a remote machine using ssh, then suddenly the Home and End keys start outputing ~ characters. And this all does not happen in xterm so it must be a konsole feature, any idea how can i get rid of it?

Saturday, January 10, 2009

Announcing KDE 4.2 Barcelona Release Party

Along with other KDE 4.2 Release Parties all over the globe, the KDE barcelona crew is also hosting one. The date is the 30th of January. Place is still to be determined, so if you have suggestions contact me asap! Also contact me if you want to be in the list of people.

Some KDE Merchandising available at Barcelona

Since last Akademy-es i've some KDE Merchandising left at home (apol has some more), so if you live Barcelona or nearby and want stickers (15cmx15cm, 5cmx5xm, round 8cm), baseball caps, akademy 2008 t-shirts, akademy-es 2008 t-shirts, fridge stickers(round 3.5cm), badges(round 3.5cm) or mouse pads(19x19cm) contact me for availability and prices. Of course if you don't live Barcelona or nearby you are also allowed to contact me but then probably shipping is going to be more expensive that the item itself.

Wednesday, January 07, 2009

Every bug report is important

Yesterday a user reported KTuberling being unable to save. Imposible! - i said, as i had tested that feature, but further investigation revealed that KTuberling was indeed unable to save files with non ascii characters, that made me create a simple regular expression i executed all over KDE code and found similar bugs in kmahjongg, parley, kross, kgpg, digikam and krita. So never underestimate the power of a bug report!

Sunday, January 04, 2009

My top 10 blog posts of 2008

Here the top 10 of blog entries visited in 2008 in my blog:

10 - pdftk frontend for KDE
9 - Poppler for windows
8 - KDE 4.1 adoption seems high
7 - KHTML rocks
6 - Performance of radeon free drivers
5 - KDE, plugins, GPL and closed source applications
4 - keyboard crazyness
3 - Morocco trip
2 - fglrx blocking Xorg on logout
1 - KUbuntu 8.04 released with rock solid 3.5.9 goodness...

One can extract several interesting things from this list:
- Last year i did not make interesting blogs, 5 out of 10 are from either 2006 or 2007
- People really want a pdftk frontend for KDE since my 2007 post of my no longer existant project is visited frecuently
- People want to use poppler in windows, strange that all those users almost never sent patches to the project, seems like windows culture is not so much about collaborating but about just using.
- My Morocco trip summary is liked by google, it's linked in the first page of results usually
- The two most read blog entries are about bugs in kubuntu ... maybe that's why Canonical never replied to me applying for jobs there :D