I just conducted an interview with Ivor Hewitt and Allan (carewolf), the developers who merged in Apple's recent ACID2 changes into Konqueror. Read on to get their "inside" feel for the situation between KDE and Apple.
Thanks Ivor and Allan for your excellent work and for responding!
Please describe yourself. What's your day job?
I: I'm from Surrey, England. Currently my day job is as a freelance developer working for a London investment bank on their trading systems. Unfortunately that, and a daily commute, does mean that I have a lot less time available to work on Open Source projects than I would like.
A:I am computer science student at Copenhagen University, I am starting to write my master thesis this summer. I have mostly supplemented my scholarship by teaching/tutoring in OS/Kernel programming and Compiler Theory.
So, do you mostly work with C++?
I:Being freelance I work on pretty much anything - Java, C#, C++, Perl, but C++ is certainly my preference.
A:I do if I can. Academically I also write quite a lot in SML, but mostly because I've never taken the time to learn OCAML. Besides that I dabble in Perl, PHP and occasionally C.
How did you get involved with KDE?
I:I've always used KDE as my main desktop environment on Linux. I've tried a few others but I just like the "feel" of KDE. I honestly can't remember the exact version of KDE I used first, or for that matter even the first version of Linux, although I did find a post I made talking about upgrading to kernel 0.99.
A:Well. I had a job in 2001 where part of my job description was monitoring the open source projects we were using (Linux kernel, Netfilter, PostgreSQL). At that point I got involved in the linux kernel. Since I was using KDE at the office I soon converted my personal mail from Windows to Linux and switched to Linux as my main desktop in late 2001.
I started maintaining a user version of KDE at university, and made patches for running KDE on Solaris, Alpha and HP. I gradually found little things in KDE I wanted to improve and at some point I just became a KDE developer.
What were your motivations for working on KDE?
I:Following a few problems on another project I had been involved in I was looking around for a new challenge. Initially I decided that I wanted an Firefox AdBlock style feature in Konqueror simply as an exercise to get familiar with the code, I wasn't sure if I'd be able to do it. So I was rather surprised and pleased when I got it working in a matter of weeks. I was also really pleased with the response I got from the developers and the warmth with which I was received - that's a great motivator and makes you want to get involved.
It was only after I'd got AdBlocK working that I found that it had been outstanding in the bug database for about five years and had something like 2000 votes. It just happened that at about the same time I was doing this Dave Hyatt announced his Acid2 pass, it just seemed like an ideal opportunity to work on another well constrained problem that would allow me to get more familiar with the code.
A:That is simple: It's fun. Also you get real results, and can make big differences, where other projects like the kernel, mostly provides small improvements in very specific cases.
Why Konqueror? Isn't Firefox good enough?
I:Konqueror integrates nicely into KDE and it's much more than just a web browser. You're not going to get me saying one is better than the other :). Firefox is good, I use nothing else on windows, but its KDE integration isn't great and I find Konqueror snappier and easier to work with.
A:In the beginning I actually choose to use Konqueror, because I just couldn't stand the way Mozilla renders Slashdot and many other pages. Back then I had no idea why, but today I know it is only because Mozilla defaults to serif fonts, where Konqueror, like IE default to sans serif fonts.
A funny thing but if Mozilla didn't use those serif fonts by default, I probably wouldn't be a KHTML developer today. Later I've just stayed with Konqueror for its speed and features, but those takes time to discover and appreciate.
How long did it take you to feel comfortable with the code base?
I:Well not that I can say I'm 'comfortable' with the code base or understand how it all works yet, but I found it extremely easy to navigate my way through the code and figure out how it hung together in just a few evenings. That is a credit to the quality of the code and architecture that's been put in place. Given how little exposure I'd had to the KDE code it was very rewarding to be able to make a difference so quickly.
A:There are large parts of the code base I still don't understand (like DOM and ECMA). I would say that for the areas I've used it hasn't taken more than a few bug-fixes or experiments to understand it, and usually you can understand it well enough to make a bug-fix within few hours. When I started developing KHTML i August 2004, I didn't know any HTML or CSS besides basic markers, I learned much of HTML just but reading the KHTML code. It is that neat.
What does your development environment look like? Are there any tools you use to make you more productive?
I:My development environment both real and virtual is a complete mess. In the real world, at the moment I have three disassembled Vaio's and two mini-itx machines in pieces on my desk along with a new toy - a surface mount removal tool and my main PC.
As for my virtual environment, I use loads of different tools depending on what machine I'm on and what I'm doing. Reworking existing code I use emacs, minor fixes I'll use vim, writing new stuff from scratch for fun I'll use KDevelop. If I'm reverse engineering then I use IDAPro on Windows.
Most of my development, however, I do on my trusty but slow Vaio on my daily commute into and out of London. As for the tool that makes me most productive.... that'll be distcc in the evenings. I'll still be working on the Vaio, but compiling remotely on two P4's "it just works"(TM).
A:I do almost everything on my laptop hooked up to 21" monitor. There is nothing like lots of Konsoles and KWrite windows to speed up productivity. I stay away from most fancy editors, I like to be in control of what I am working with. If nedit worked in KDE I would probably still be using that.
To make Konqueror ACID 2 compliant, what did you do? Did you merge Apples changes in, or rewrite? (Or some combination?)
I:As Allen said in his announcement: "Roughly half of the Safari Acid2 patches could be merged in some form or another, and another two bugfixes could be merged from Safari 1.3 once found and isolated. The rest was written from scratch. All in all not a bad reuse of code, although slow."
So a combination of both, most of the time was consumed understanding the reason for some of the Apple changes. On the other hand the fact that David Hyatt had already identified what areas were causing problems no doubt saved time. Of course the fact that you know that success is actually possible helps a lot.
A:I started by looking all the patches over and merging what made sense. None of them could by auto-applied, so I applied them manually changing and expanding various things underway. Two of the bugs turned out to have been already fixed in KDE, and one fixed a bug we had never introduced. One patch was entirely rewritten, but with the same idea. When that was done there was still many holes in smiley, and I left the work to focus on my university project.
After a few weeks Ivor turned up and showed much interest in fixing the rest. I gave him a few hints and let him work. After a few days it turned out some of the issues where more problematic(interesting), and I just couldn't keep myself from trying to solve them (I am sure this will cost me a grade in my project). When I joined, Ivor and I fixed the remaining bugs in less than two days.
How would you compare Apple's code with KDE's code?
I:Can't say I have an opinion on that at all really. Clearly the majority of the code I was looking through was KHTML code but with just the occasional Safari change. Ok I do have an opinion I dislike their C++ indentation style difference. :)
A:Not bad. In the most recent release the Safari 1.3/2.0 code, they have actually started to make several clean-ups. However it also has obvious hacks here and there to fix specific webpages.
Did you have any interaction with Apple?
I:I had a few chats with David Hyatt on IRC, but other KHTML developers have had more contact.
A:Not until after the first two Acid2 blogs. They contacted all recent KHTML developers to ask how we could improve the relationship. It was here established very quickly that Apple would open their CVS, but they wanted to announce it at WWDC. Apple also had an interest in KSVG and since they didn't have the manpower to write a SVG render themselves, they wanted to get our code base close enough that they could adopt new KHTML technologies easily. So now were are aiming for a win-win situation and talk regularly on IRC.
What is your take on the idea that KDE could "refork" Apples work and use that instead of the current KHTML code?
I:Events have overtaken your question here. :) With the announcement of Apples WebKit Open Darwin project it should be much easier to be able to trace and understand changes in Apple's code.. Personally I'd say that throwing away KHTML and starting again from WebCore isn't necessary and just doesn't make sense, a lot of the changes made by Apple have been done out of necessity due to their different underpinnings, aside from that another fork would again be just that, it would very quickly diverge with the different demands and pressures that a company like Apple has to those of KDE.
With Apple's announcement of Webkit, do you know if you or any other developers will be tracking changes to Safari and merging those more quickly? How will this announcement affect KHTML development?
I:It's too early to say what's going to happen. Yesterday it was crazy, at one point there were 120 people in the #webkit IRC channel. It will be interesting to see how things progress over the next few weeks and months as things calm down. At the moment I believe we still don't have access to the historical bugs database, but I think that's being addressed. That will make the most difference, seeing a change in the code that says this addresses issue #xxxx and then being able to actually read the bug report and find out what the fix was for and seeing a test case, that will be useful.
A:I started to track their commits yesterday and have already merged the first patch (implementation of the Mozilla extension DOMParser) a few hours after it was committed to WebKit. When I get more time during the summer holiday, I plan to skim through more of the CVS history and pick isolated patches that will improve Konqueror and close the source gap.