Structured Testing For KDE 4.9

This release cycle we're trying to improve the KDE quality process and add in some structured testing. This is a new program so we're trialing a lot of new ideas.

Application testing checklists

I've taken responsibility for testing all the newly rewritten QML plasmoids with a thorough checklist to make sure everything new is up to scratch ready for a great Plasma future.

This also exists for some other KDE apps (see wiki pages for details), and hopefully more in future.

Bug hunting days

On the weekend of the 9th and 10th of June we will be running some bug hunting days. This will involve IRC training in good bugzilla usage, we will then spend the weekend in an intense testing and bug triaging session, with developers spending some of this time fixing these bugs.

Change testing

Also we're trying to identify all the new areas of medium-large changes and identify these as "areas that should get some more thorough testing". Developers, we need you to update this list with any new features that have been added or areas that have had big rewrites. Users, when you're testing go through this list, and give a bit of extra focus to these sections.

Developers and users, get involved!

Google Two-Step Authentication On Your Desktop

What is it?

Google offer a two step authentication system for their websites where, in order to log in, a user must enter both their password and a special number displayed on the user's phone using a special app that displays a changing unlock code. This code is only valid for a 2 minute window, and so a hacker needs access to the device as well as your password in order to log in.

An implementation behind this is also available in the form of a PAM module so you can install the same security on your PC. Despite being written by Google engineers, everything is run locally and it does not use your Google account.

As well as installing the PAM module you will want to download "Google-Authenticator" from the Android marketplace or iPhone store. Both of these are open source.

Installation & Usage

Install through your package manager

sudo apt-get install libpam-google-authenticator

or download the source

Once installed, run

google-authenticator

. You will be prompted with a series of questions, and then a secret key will be provided. Alternately scan the barcode into the phone to set everything up automatically.

Konsole output How it appears on an Android phone

Integration in LightDM-KDE

I added support for this method in an experimental branch of lightdm-kde available at: git://anongit.kde.org/scratch/davidedmundson/lightdm-kde.git in the branch google-auth.

In order to use the two-step authentication we need to add the following line

auth required pam_google_authenticator.so

to one of the files in /etc/pam.d. Each file represents an authentication usage, and adding this line tells it we require google_authenticator to log in.

Add this line to /etc/pam.d/lightdm to force LightDM to prompt for the two-step verification code. It can be added to other files to prompt on console login or sudo for example, but note that it will not work in KDM.

The Future

PAM support in graphical prompts still needs a lot of work, this mostly stems from the fact that PAM was not really designed with graphical interfaces in mind.

Moving forward we need graphical interfaces to configure PAM, and GUI support for a range of modules, not just in LightDM-KDE but also in PolKit prompts, lock screens etc. I intend to kickstart this on the LightDM side, to support more PAM methods in a more elegant way and hopefully improve the existing kgreet library.

The plan for LightDM-0.2

Having got the first release of LightDM out the way we're looking forward to what our future releases should entail.

0.1 was released purely so we could start testing and get feedback as to what features need to be added for subsequent releases. In some areas we are already ahead of KDM, and even the LightDM frontend used by Unity but in some areas 0.1 is really lagging behind and there's a lot to be done before it's "complete" and ready for distributions to ship.

What's coming in 0.2

Multi-screen support

I have a branch which hopefully makes some progress on this. However with only one screen this is somewhat hard to test! Ideally I need to work with upstream to come up with a QML plugin that we can use in KSplash-QML too.

Live previews in the config tool

One of the special features of LightDM-KDE is that it's really easy your settings, such as change your wallpaper or add a company logo. I'm adding a way to show a live preview of this whilst you change the settings.

Seamless logins

KSplash has a QML backend, we're powered by QML...by copying the same code from our greeter theme to a KSplash theme it will look identical. This means we can load the same background you chose for your login screen, and we won't have the issues with differing aspect ratios that we see in KDM.

General improvements

0.1 shipped with several bugs, broken translations, poor keyboard shortcuts, and loads of UI bugs. We're slowly fixing these, including getting a lot of these changes merged upstream back into Plasma Components. Massive thanks to Aurélien Gateau for his help on this.

Powermanagent

This has already been implemented thanks to Alex Fiestas.

How to try out in Kubuntu 12.04

Even though LightDM isn't the default display manager in Kubuntu it made it's way into the repositories, installation and testing is one command away. You will then be prompted as to wether you want KDM or LightDM to be your default display manager. You don't need to change the default just to try it.

sudo apt-get install lightdm-kde-greeter

Can I see a screenshot that isn't related to anything you just said?

Sure! Blogs without screenshots are dull, and it's hard to screenshot power management....

How to get involved

Report bugs to https://bugs.kde.org/ selecting the product lightdm. If you want to get involved coding or designing;,drop me an email (which can be found at the top of any header file of the source)! Or join #kde-lightdm on Freenode.

KDE Telepathy 0.3.1 Released

Today we released a patch on our 0.3 stable version of the KDE Telepathy IM suite.

Downloads are available from KDE's download site or from your distribution very shortly.

This release contains several minor bug fixes from our last release, and adds further stability.

When is 0.4 coming?

0.4 just entered a soft feature freeze, meaning no new features that aren't already nearly complete can be merged. This will move to a hard freeze on features shortly. From then on we will be in a purely bug fixing stage and 0.4 will be released when all bugs that are marked as blocking the release are fixed.

The more people that can help with testing and coding the quicker this will happen, so please get involved.

What’s coming in KDE Telepathy 0.4

It's been a long time since I've blogged about KDE Telepathy, we've got so much going on that we've had to delay the release so we can get everything perfect. Here's a sneak preview of all the new stuff in this release.

Log Viewer

Assuming you have had an application called TpLogger installed all your messages have been logged, only without a way to view them. Now in 0.4 I wrote a log viewer to see them all.

Merging Kopete logs is a work in progress, but it is being thought about (but probably not for 0.4).

Chat Plasmoid

As Lasath Fernando blogged previously we have a plasmoid for handling chats.

Since that blog Lasath and I have changed the behaviour slightly so that all new incoming chats open directly in this plasmoid (if installed) then there's a button to pop out to the full blown text interface if needed. It acts as a far more advanced notification interface, through which you can reply. It's very much like the GMail web interface, but integrating with your desktop. It also contains several fixes since it was first announced.

(font colours need to be sorted out clearly)

Contact List Plasmoid

This is a new addition to our features, this was originally started as a small part of a GSOC project by Francesco Nwokeka last year. It's since been tidied up to a proper Declarative Plugin and really simple QML.

What we're doing with all our new plasmoids is buliding nice-reusable declarative plugins and keeping our plasmoids are very desktop oriented. Plasma Active can then redo this in a very touch oriented way only redoing the GUI layer.

We still really need some design inspiration on ours though.

KRunner integration

Dan Vratil has written a KRunner plugin for KDE Telepathy allowing you to quickly search for your contacts and start chats, it's now passed our rather rigourous code reviews and heading into our repositories!

Fixes galore

Whilst we've been developing these new features, we've also been fixing little issues elsewhere; bugs and crashes to the small UI details. Daniele Domenichelli has made some massive improvements to the Adium Theme support in the main text view, amongst all sorts of other fixes.

Video support?

All the pieces towards working video are coming together thanks to the amazing work of George Kiagiadakis, so hopefully we can get video in this release. Don't count on it, and it's not quite ready for testing yet.

So when is it coming?

The release was originally scheduled for late March, however to get all these features perfect we are delaying the release slightly. You can see in the screenshots things are a bit rough round the edges so it'll be ready when it's ready, but we're aiming for around April/May.

Can I help?

Absolutely! Attracting attention is the only reason I write these posts :). We have a load of tasks that need doing, and not just coding. The contact list applet above needs a lot of designing, a mockup in photoshop/equivalent would be amazing. We still need more testers who report and triage bugs, and there's jobs for everyone. Plus we're a cool group to hang out with, honest.

Head down to #kde-telepathy on Freenode to find us.

How else can I help?

Contribute to our beer fund! This will be spent at Akademy and future sprints and split across all the members contributing to the project to buy us all a well deserved beer.

We all work on this purely in our free time with little compensation so it's things like this which keep us going.





A Review of Code Reviews

When I first started hacking on KDE-Telepathy the original manager was very insistent that all code should be reviewed before merging. Initially it was something that I considered a complete waste of time but has since grown on me as a really important step in development.

Recently, I've been getting involved with following another very prominent important KDE project and I've been a bit concerned by the "hack and slash" attitude that I see in that IRC channel with commits coming from all over the place, with very few of them looking like they're actually reviewed.

What's good about code reviews

Code reviews obviously result in "better code", but I think there is a tendency to think it's only for people making their first patches. This attitude is utter nonsense.

Many eyes make all bugs shallow

Also known as "Linus's law", the more people who look at a piece of code the more likely you are to find a bug. It's a lot easier to fix a potential bug at review stage than find it after it's deployed. Everyone makes mistakes, it's the best time to find them.

Shared responsibility

This is tied into the above. Let's say Martin submits a patch which I review which turns out to be crashy. Who's fault is it? It's his fault for the dodgy code but it's just as much my fault for not spotting it. It's also everyone else's fault for being too lazy to review the patch. I think code reviews take away some of the "blame game" when it comes to bugs.

Code habits

This is more for the people starting out, but it's a good time to spot the bad habits of missing "consts", bad whitespace, not checking for null pointers etc. It's better to point these out here and "block the commit" publicly so the submitter learns than to simply fix it for them.

Usability issues

One of the main things we've gained from reviewboard is fixing situations where the code is perfectly fine, but what it's doing isn't. At review is a good time to make sure that not only the code is correct but that the user experience is the best it can be. This means checking any strings presented to the user, we've had huge arguments over the tiniest of details "Alias" vs "Nickname" and checking all forms are visually well laid out and arguing over each pixel in a paintEvent. It can be frustrating at the time, but I reckon we get a better product for it.

Attaching screenshots help. Occasionally we've done UI testing just with a screenshot. I've sent someone else a link and said "explain to me what you think this button does". If they're unsure, the text/layout needs changing.

Keeping code simple

A good coder can write complex code, an expert coder can achieve the same complex tasks in a really simple way. It seems counter-intuitive but the better programmer will be writing simpler code as you learn how to design things better. I have rejected perfectly working patches saying "rewrite this part so it's easier to read" or even a simple "comment this". If it takes me several minutes to understand a patch at review time where I'm only looking a small section and have a description it's going to be a real pain for the next coder who wants to edit some code around this or fix it.

I've heard rumours of code in KMail with a comment that says "//Don't touch this unless you are ....". That's a horrific state to be in, and a lesson we should all learn from to avoid. It's far easier to sort this at review time when the author can remember how the code works.

A second set of eyes may be able to find a cleaner way to do it, it's often easier to find the best way to solve a problem once you've first drafted something.

More awareness into goings on in the project

If I have to read the code well enough to be able to review it properly I'll have a better understanding of how everyone else's code works, this is very useful when you end up having to add a feature somewhere that relates to their code.

What sucks, and how to avoid it

ReviewBoard is sooo slow to use

Use post-review, It does work. However the version shipped by your distro may be too old for the version of reviewboard we have. Follow the instructions to installing post-review on the reviewboard website.

It's still slow

The post-review flags make things a lot easier, --guess-description is pretty good, it fills everything in based on your git commit logs.

Make an alias for reviews you type often. This is mine for all KDE Telepathy reviews.

alias tpreview='post-review --parent=master --tracking-branch=anonupstream/master --guess-summary --guess-description --target-groups=telepathy -o

It's still really slow

On #kde-telepathy you'll constantly see links to pastebin being sent about. We use this for small patches, it's not as formal as using review board but it gets the same job done.

Another speed-up trick we do is to point out changes but say "ship it!" anyway. If only trivial fixes are needed, there's not always a lot of point making them submit a new patch with it fixed.

Pushing a git branch is easier than reviewboard

Use that then, the tool isn't important, what's important is making sure reviews happen.

It's pointless for small patches

As with anything common sense is needed. I once got bugged on IRC "d_ed, d_ed can you review this" and showed me a change from "#include <QLabel>" to "#include <QtGui/QLabel>". Be pragmatic.

It blocks development

No it doesn't. As soon as you submit a review, create a new branch, carry on working. If you think reviews block development it probably means you need to improve your git-fu.

It's disheartening to see your code ripped apart

Absolutely, I once had a 2000 line patch that I wrote on Christmas Day torn apart by Martin who proved part of it was pointless and cut it down to about 400 lines, removing this really clever feature I had. It's better code for it though. Deal with it.

Reviews sit there for ages untouched

This is the biggest issue we face, some difficult patches no-one wants to review, and in such a small team like ours people are often simply away/busy. Having a patch stagnate is frustrating for everyone.

I also found a lot of the new people in the project felt "unworthy" to do reviews, which is silly. If I submit a difficult patch I may be waiting for a specific person to review it, but that doesn't mean any other reviews aren't highly valuable.

I'm not sure of other good ways to solve this.

It's hard to review large amounts of pre-existing code

Yeah 🙁 I have no idea how to solve this. We got this even for the few small apps in KDE TP, as every new app starts off as "just prototype code" in some scratch repo somewhere, then end up getting merged.

Summary

  • Everyone should have their code reviewed. If you think you're so good that you don't need reviews, you're mistaken.
  • Reviews are the perfect place to discuss UI isssues. Think about and challenge every user facing word, every UI decision.
  • Make that easier, attach screenshots
  • Use the appropriate tools for the job, for us this isn't always reviewboard for small commits.
  • Everyone should be involved in reviewing, don't leave it for someone else or people will be put off submitting things for review.

An Update on LightDM KDE

What's been going on?

  • We have an official repository in KDE Playground
  • Whilst I've been busy with actual job work (boo) and KDE Telepathy, Aurélien Gâteau has been making some outstanding progress helping me on it.

What is LightDM-KDE ?

LightDM is a login manager, much like KDM, GDM, XDM etc. It handles all the complexity of setting up X, and dealing with PAM for logging in users.

LightDM is interface-agnostic, so we built a KDE front end on top, cleverly called lightdm-kde.

Why is LightDM-KDE more awesome than everything else?

It has a well thought out, clean and simple to use configuration module

Use of QML makes themes a lot more powerful than anything elese . We have guest support (if the distro supports it) and can provide visual user selection. Hopefully by using QML we can also have a completely seamless changeover to KSplash which now also has a QML frontend.

I'm really excited about guest support, as it serves one other useful purpose; every KDE developer can test how their app looks when it first loads to a user without any excuses or difficult setup.

One of my main goals in LightDM-KDE is getting round this idea that themes and customisation are mutually exclusive, like we see in KDM. There are two tiers of customisation, wanting to change the background, some text or a corporate logo which many many users will want to do, and the second stage of wanting to build an entire new theme that looks radically different which is only used by a few people. Using technology stolen from plasma each theme can specify some configuration options, allowing the vast majority of users to make those little tweaks without having to learn how to build a whole new theme.

Is it ready?

LightDM-KDE is at that stage where it's ready for testing. You can try it out in a sandbox mode, by using "lightdm --test-mode" which starts a nested Xephyr X session without disturbing your normal login processes.

The backend itself, LightDM, is already deployed on Ubuntu and therefore has been tested on millions of computers already.

It's still a bit rough round the edges in a few places and therefore not really distro default ready. You can see this a bit in the screenshots, they're not as good as I want them to be but hopefully this will be fixed over the upcoming weeks. KDM still has some features we don't, but we have a /lot/ that KDM doesn't have.

Open any bugs at bugs.kde.org selecting the component LightDM.

If anyone has any designs/mockups for themes or better yet wants to design a theme please get in touch with me.

I installed it from source, and it doesn't work...

I recommend you use distro packages where available for all the extra code dealing with setting up init.d etc.

You will probably find you need to make a symlink in /usr/[local/]share/xgreeters called default.desktop to lightdm-kde-greeter.desktop. We cannot do this at install time as it would cause clashes.

Run with "lightdm -d" for debug, this will generally tell you what's wrong. If not, open a bug report.

How to report bugs – Usability Issues and Wishlists

There have been plenty of blog posts/articles about how to report bugs of problems and crashes, but when it comes to other types of bug reports what's required is a bit different.

Report the problem, not a proposed solution

Reporting usability issues is great, it's perfectly valid and even encouraged to open a report that says "it's tricky to do XYZ" or point out when something isn't intuitive, but it should be done properly.

This might sound obvious but it's very very common for people when making a usability request to report what they think something should be changed to rather than defining the actual problem.

I have a massive list of real bugs I could cite, but I'll give a made up example to not upset anyone; in KDE Telepathy we have a list of all the available types of accounts you can create. It's a fairly long list.

A bad usability bug:

"There should be a text filter where one can type in some text to filter the available options"

A good usability bug:

"when searching to create a Facebook account it took me a long time to find it in the large list"

I see hundreds of "The contact list should dock to the sys tray", "this should scroll vertically" or "this combobox shouldn't be editable", and none of these actually explain the problem. If you say what the problem is, then we can fix the actual problem.

It would be perfectly valid for the the good bug report to propose a solution in the comments, in fact I'd be happy to see it, but the "solution" should not be the main point.

By stating the problem really clearly it makes it clear why you want the change you want making, but it also enables everyone to brainstorm alternate solutions that solve the problem. For the example above, we found there were only a few favourites people chose regularly so it could be shown as a set of buttons which solves the original problem much better. It could well end up having the same result as you would propose, but no feature anywhere should be implemented without discussion and without weighing up all possible options.

When making a wishlist entry, state the use case

The above also applies for wishlists, say "why" you want something added. You'll get a better solution from it, and you're more likely to get a developer response if they understand the motivation.

As a developer it's very important to ask this "why?" question too, you'll avoid pointless feature creep, and give the user actually what they want rather than what they ask for. You might get some sensible answers, but also some ridiculous ones.

Some example unacceptable answers:

  • Just repeating the request
  • "Because we can" (a very bad mentality when it comes to adding things to the UI).
  • Because some other app does it.
  • Any incredibly niche situation that probably applies to no-one else.
  • An unexplained "I don't like XYZ", or worse, the completely arbitrary "it feels very windows-y"
  • As a bodgy workaround for a different problem.

Also when talking about wishlists it's perfectly ok to talk in first person; please say "I want...", don't say "Most users want..." unless you have actually asked most users. It won't help your case and it certainly annoys me.

KDE Telepathy Moves To Extragear

KDE Telepathy has now moved from playground to extragear! This is the first step towards slowly taking over as being the official default messaging client in KDE, which will kick the crap out of any other IM clients out there.

I'd like to publicly thank everyone who helped get us to this stage. It's not been an easy ride, and we've made our fair share of mistakes (I'm probably responsible for most of them). We still have a long way to go, we're mostly a very solid product, but there's a staggering amount of wishlist items and features needed before we can claim to be finished. Please join us in #kde-telepathy if you want to help out.

If you want to thank us for our hard work, many of us will be at FOSDEM, please use the donate button below help contribute to our beer fund. All donations will be spent exclusively on alcohol/partying and not wasted on anything productive.