Andrew Stanley-Jones on KSirc
In the following interview, Andrew Stanley-Jones, original author of KSirc, gives us some of the insights behind the design of KSirc -- the Internet Relay Chat (IRC) client for KDE. Read on for such gems as "No company I've ever worked for has offered to pay me to write a client that allows you to waste time chatting online" and "I argue [that chatting on IRC] keeps me awake during a chick flick". This interview was featured some time ago on KDE.de and is provided in English courtesy of Andreas C. Diekmann.
Andrew Stanley-Jones on KSirc
Interviewed by Andreas C. Diekmann1. When did you first start to work on KSirc? Who else is involved with this project?
KSirc was first released Nov 11 1997, but it really evolved in many stages. I had always wanted a powerful IRC client that ran under X and provided very strong scripting support. For the past few years I had worked on Perl/Tk, XForms and Perl/Qt based IRC clients.
By late 1997 I had given up on the notion of writing the whole client in Perl. The Perl/Tk or Perl/Qt libraries just didn't cut it, and the installation hassles for users was too much. Around September 1997 I decided to give programming Qt in C++ a shot and see what I could learn. As I wrote the client I started using KDE widgets since they made my life easier and provided some nice features.
I ran into Stephan Kulow online and we started up #kde on irc.linpeople.org, which is now irc.freenode.org. After some time I was asked to put KSirc into kdenetwork, and off it went. I started getting a lot of help at that time with code cleanup, making things more sane, etc.
In 1999 I graduated from school, moved to the US, and stopped maintaining KSirc due to a lack of desire and personal reasons. Essentially KSirc did everything I needed. Work on on KSirc was done by various KDE people for the next few years. Names included in the credits are Waldo Bastian, Carsten Pfeiffer, Malte Starostik, Daniel Molkentin, and Simon Hausmann.
A lot of work was done, like porting it to Qt 2, Qt 3, and tons of maintenance and fixes. Simon Hausmann put a huge effort into writing a new IRC text widget which I'm really impressed with. I don't want to leave anyone out, but listing the amount of work done over 3 years by various people would be a huge task!
In late 2002 due to change in employment, or lack thereof, I started working on KSirc again. I've contributed some minor patches to the 3.1 tree, but the bulk of the new work are big changes to head.
2. How is this project managed? Do you use KSirc to communicate with the other project members? Do you know them personally?
KSirc never really seemed to garner a strong group of developers working on it like other software did. Even when it first started I'd randomly receive patches every once and a while. I'm not sure if it's just due to the style of the application or my personality developing it.
I used IRC to get a lot of feedback from people and discuss how to implement features. Since I took up KSirc again in 2002 I've talked extensively on IRC with Simon about his new widget and how it works.
3. What do you see as the "strong points" of KSirc in comparison to other IRC clients?
The design of KSirc is based around a couple goals:
1. Powerful Perl scripting. That's why the actual IRC code is written in Perl. The underlying code that does IRC is from an application called sirc, which has a Perl core with an ncurses front end. The nice part about it is the ease of extending or enhancing the program with your own scripts. sirc has a hook mechanism that really works well with your scripts just becoming part of the IRC client. Other features such as timers, adding file descriptors to the select loop, etc are all implemented providing the would-be script writer with a very nice interface.
2. Ease of use. This means something different for KSirc when compared to other KDE apps. Since I use KSirc about 8 hours/day I need it to be easy and fast to work with. For example, most users of IRC in text programs are used to typing /command. For help they type /help. I've always found this faster and less disruptive than having to click on a menu and then another one, and finally getting around to a command.
This also means the application must be stable, I can't stand clients that crash. This was one of the leading reasons I got back into development.
3. Configurable. The way I use KSirc may not be the same way you or anyone else want to use the application. At first a lot of this was done was using scripting and filter rules, but as time and features expanded this has meant more GUI configuration options. It still misses a per server configuration, but that's not far away.
The order I've given to these is the order of importance. This does conflict with KDE ideals sometimes, and we knew this when we started. I never meant to write an application that looked pretty, gave you a choice of what server and channel and ended there. This means that for a new user unfamiliar with Unix, networking or scripting may be harder than it might have been. As such I've always supported KDE having a simple IRC client.
There are few weak points in KSirc inherent in the design. Internationalisation is hard since the Perl backend is not written to support it. Even if it was, it would be Perl i18n, not the familiar KDE one. Since everything inside the IRC window is created by the Perl backend, this is a lot of the messages.
The C++ front also has no easy way to request data from the Perl backend. There's two problems here, the C++ GUI cannot block on the backend, and there's no way to know who's waiting for that particular command. For example, did the user just type /whois or was it the application?
4. What are your plans for KSirc? Any new features we may be looking forward to?
There's a couple areas I feel KSirc is really lacking in, the first being the Perl scripting and its ability to interact with the GUI. At this time there is no way to tell the GUI to do something, set a flag, or alert the user.
Back in 1998 I began work on a way to allow the Perl to take control of the GUI, it was called Perl User Kontrol Environment, or PUKE. I made a few mistakes, and it turned out to be a lot of work. DCOP has since been created and seems to allow for a similar feature set. So I look forward to enhancing both KSirc and Perl/DCOP to provide a nice interface.
The Perl backend is showing it's age. It was first written for Perl 4, and Perl has gone through many changes since then making many things much easier. For example, the current hook implementation could be done using code references, and data structures could be built using more complicated types than multiple hashes. Not sure how this will take shape.
5. KSirc is published under the "Artistic License". What are the reasons for this? What do you think about "Open Source" in general?
KSirc was changed from GPL to Artistic in 1998 or so. I got fed up with the Qt is not free discussion and all the endless junk that was going on. I figured the best way to show my dislike for the discussion was to stop developing a GPL'ed application. Perhaps no one would cared, but it was the best I could do.
After a few years working in various companies I've started to rethink the benefits of the GPL and have been thinking about trying to get it switched back. Based on the number of copyright notices in the headers this doesn't seem like a major problem, most of the code contributed is under the GPL.
6. Is your work on KSirc sponsored in any way?
Not directly. No company I've ever worked for has offered to pay me to write a client that allows you to waste time chatting online. Wouldn't that be nice to tell the boss, yes I have to be on IRC to allow me to test the software.
In my new job I take the train to work, 1 hour each way. I picked up a laptop so I can work on KSirc. This has really helped to move KSirc forward over the past few months. Features I've added on the train include the new dock mode, improved preference controls, new DCC interface, etc.
7. Do you have any favourite KDE tool (apart from KSirc)?
It's a pretty hard call. For web browsing I use Konqueror almost exclusively. So it must be pretty high on the list. Of course, Klipper rates very high, but a look at the credits will answer why. What I don't understand is why it doesn't exist on other platforms. The idea of clipboard history isn't very complicated, but incredibly useful.
Other applications that get a lot of use are ksysguard, klaptopdeamon, kwifimanager, etc.
8. What should the "desktop of the future" look like in your opinion?
I really don't spend much time thinking about the desktop of the future. I really care about an environment that allows me to work quickly and efficiently. I appreciate good looks as much as anyone but it can't be at the expense of operation.
9. Which OS and hardware do you use at work and at home?
All my work is done under Linux. At home I do development on a dual Celeron 466 with 512M of RAM, my laptop is a 1.2 GHz PIII with 256M. Both work pretty well for KDE development.
At home I have a small network of 3 machines including an old p200 doing routing and various services. I talk with the laptop using 802.11b which is working out very well.
10. Could you tell us more about the person "Andrew Stanley-Jones"?
Well let's see, I'm a Canadian who was lured to the US by jobs and the promise of less snow. All of which turned out to be true, and I haven't seen snow in almost 4 years so I'm happy. I graduated with a bachelors of Electrical Engineering in 1999 and I've been doing embedded Linux development ever since. I got married last year to the best lady on earth, and am having all around a good time.
11. How do you spend your spare time, if any?
Spare time tends to be split up in many areas. Spending time with my wife and family is very important to me. I also spend a good part of one day of the weekend at the local airport either fixing or flying my air plane. Frequently the local flying organizations organize "Young Eagles" events where you give school age children a flight in a small plane. I try to attend those any chance I get.
Since I spend 2 hours a day on the train doing KSirc, at home I don't do much development, but more actual chatting on IRC. I get frequent complaints from the wife when I bring my laptop in during a movie so I can chat on #kde-devel or what have you. I argue it keeps me awake during a chick flick.