Sunday, July 31, 2011

Knight-Mozilla Learning Lab – week #3

Time flies as the third week's coming to an end. This week I was completely blown away by Mohamed Nanabhay's awesome lecture, so I'll be basing this blog post on his lecture. :)

During the lecture, while proudly wearing a Creative Commons T-Shirt, it became apparent that Mohamed is an incredible multitasker. He was able to directly address questions that were asked in the chat window. One of those questions was asked by Julien:
Julien Dorra – 11:31: Q: about the video content, what tools would help you to better find it, analyse it and use it
Mohamed answered the question by mentioning the shortcomings of tools. Tools cannot cope with changes. For example, when Facebook changes (API, new features) or when a new social website appears (think of Google+), the tool stops working or becomes less effective. Still, there is a problem of too much information being out there.

One of the lecture's slides

So how do we prevent journalists from drowning? How can we create tools that help them to navigate, search and browse a huge collection of documents? Fellow lab participant Juan Gonzalez is working on a dashboard that shows video summaries, allowing people to browse effortlessly through a vast library of videos. I'm not sure if Juan has thought about how he would generate video summaries, but we could generate these summaries using metadata coming from LikeLines, a technology as you might know I'm working on during this learning lab.

Talking about LikeLines, I've been working on a prototype and a storyboard for a video this week. I wish I could already show you the real prototype, but for now you'll have to do with a mockup I made:

Mockup that will guide me during the development of the first prototype

I'll be focusing on getting the UI front end done first. The back end will be some server-side Python script that will be serving more-or-less static data. I'm taking this approach so that there will be at least something tangible, but it will also make the process of creating a video easier, since I can just use screen capture software to show LikeLines in action.

But there's still one thing I'm a bit worrying about and that's whether I'll succeed selling LikeLines to news organizations. Looking at this week's additional assignment,

Keeping in mind the objectives and challenges identified in this week's presentations by Shazna Nessa and Mohamed Nanabhay, how does your project take into account the need to facilitate collaboration in the newsroom (whether real or virtual), while acknowledging that team members will have varying technological skill sets?

I cannot answer this question, as LikeLines in itself will not affect the newsroom directly. Instead, it will be tools built upon LikeLines that journalists will be using.

Anyway, I'll end this blog post with a logo I've been designing for the LikeLines project. It took me a lot of iterations (because designing logos is hard). Feedback is appreciated. :)

Sketch of LikeLines logo

Tuesday, July 26, 2011

Weird bug: wxPython hates ampersands

Yesterday I was discussing a new Tribler 5.4 feature (What kind of feature? Well, that's a secret. :p)** with Niels, when I mentioned some cosmetic bug that still had to be fixed in Tribler: ampersands are not displayed correctly, or at least, they are not displayed correctly in most of Tribler.

The bug was solved for the Manage My Channel panel in December 2010. Before that date, if you entered an URL of an RSS-feed that contained an ampersand, it wouldn't show up. Instead, it would underline the next character. The use-case for this particular behaviour is for indicating accelerator keys.

Now, the fix is quite simple. Just escape the ampersands before displaying them:
rsstext = wx.StaticText(rssPanel, -1, url.replace('&', '&&'))
After applying this simple fix, everything works:

Yesterday we decided to apply the same fix in other places of Tribler, for example in the search results list. Everything should just work, right? Well, guess again. No matter what we tried, wxPython refused to display the ampersand character properly. We are clueless why this strange behaviour occurred. If the same piece of code works in one part of the program, but not in another, what could possibly be wrong?

We turned on the debugger and tried to chase our value that was given to the StaticText constructor. Unfortunately, the constructor is nothing more than a shell around some compiled code:

We put a breakpoint right after the call to the C++ constructor to check the internal state of the StaticText. We saw that the value of the label argument was correct, but the Label and LabelText attributes of the StaticText were not. Aaaargh...

To end the blog post on a more positive note, the workaround that seems to work is to write this instead:
text = wx.StaticText(parent, -1)
But we might as well subclass StaticText or monkeypatch it...

** Although it's not really a secret if you know svn... :p

Monday, July 25, 2011

Knight-Mozilla Learning Lab – 256 bytes ought to be enough for everyone

In my previous blog post I already mentioned that participants of the MozNewsLab have to come up with a very short 256 character description of the final project they'll be working on. The deadline for this task is today. In this post I'll be describing the different iterations my LikeLines description went through.
Before I started writing the first version, I decided to draw a mind map of LikeLines so I had an overview of what could go into the 256 characters description. For this I used my Asus EP121 tablet and Microsoft OneNote 2010 (a must have tool if you have a TabletPC):

(click for full version)
Having drawn this map, I decided to just write some short description down and see how well it went:
1) LikeLines unlocks video. It exposes the parts of a video found interesting by the community, allowing for rich video navigation and retrieval at the fragment level. By itself it’s a building block, enabling all kinds of interesting use-cases for news story telling.
This description captures most of the things I want to be captured, but crap, it's 265 characters! A bit too long. But hey, let's rewrite the last line into something shorter:
2) LikeLines unlocks video. It exposes the parts of a video found interesting by the community, allowing for rich video navigation and retrieval at the fragment level. Being a building block, it enables various interesting use-cases for news story telling.
Now it fits: 253 characters. However, I'm not too happy with how it flows. Let's give it another go:
3) LikeLines unlocks video. It exposes the parts of a video found interesting by the community, allowing for rich video navigation and retrieval at the fragment level. Used as a building block, it enables various interesting use-cases for news story telling.
Okay, I'm starting to get happy and it's 255 characters, but it's not perfect yet. I took this third attempt and asked Martha for some input. During the discussion I wrote down some notes for the next attempts (I wrote these notes down in Word 2010, but unfortunately, Word does not support pen and touch input as well as OneNote does).

Iterations 1 to 3 so far were okayish, but they were lacking a few things. For example, it's not clear from the description how LikeLines finds the interesting bits of a video. Furthermore, the description talks about video in general, while it might be more appropiate to put the focus more on videos uploaded by people (in contrast to, e.g., video of tv shows). Addressing these points led to the fourth version of the description:
4) LikeLines unlocks user-sourced video. Interesting bits of a video emerge naturally through community interaction with the video, allowing for video navigation and retrieval at the fragment level. It serves as a building block for rich news story telling.
Hmm, it fits (254 characters) and it's better than the third version, but it doesn't flow well. Wait, the last sentence is important as it describes what it's good for. Let's move it to the front for the fifth and final version:
5) LikeLines unlocks user-sourced video and serves as a building block for rich news story telling. Interesting bits of a video emerge naturally through community interaction with the video, allowing for video navigation and retrieval at the fragment level.
Great! It flows well, states first what it's about and the second part treats how it works. As a bonus, it's still only 254 characters!

Knight-Mozilla Learning Lab – week #2

Another week has passed, which means it's time to blog again. Today I'll discuss the two mandatory lectures from Monday and Wednesday, but before I do that, let me thank Stijn and Mark for leaving helpful comments on my previous post. Thanks guys! :)

So, the first lecture was given by Chris Heilmann and was full of interesting points. Too many to cover them all (read: go watch the lecture yourself), but one of them was his view on web apps. They are great. You don't have to install them and there is no need to update them. "The web upgrades itself". This view intrigues me as it reminds me of self-organizing systems (and indirectly of P2P systems, but I won't go there as I fear I'll drift off-topic). In a sense, LikeLines is what I think would allow for self-organized videos. Anyone can upload raw and unedited videos and the viewer community adds structure to it by consuming the video. Through interaction with the LikeLines video player, interesting bits of the video will emerge naturally.

During the Q&A session of the lecture, Chris mentioned that skills from journalism are important for the web as well. You should be able to write a short text first, since people have a short attention span. They want to get the gist first and details later. Now, the upcoming task of this learning lab of describing one's final project in at most 256 characters will definitely test my writing skills.

The second lecture of the week was given by John Resig (author of jQuery). John discussed what's important in an open source project. For example, it is important to understand how to retain your users during the several phases they go through. Like during the "getting started" phase, you cannot assume any background knowledge and you'd have to be rather explicit. This reminded me of a poster paper I wrote with my TU Delft colleagues that got rejected at SIGIR, in which we assumed some P2P background knowledge. This lecture's advice came a little too late, oh well. ;)

Another thing that's important for open source projects is to open up your process by, for example, having the community vote on which bugs to fix first. This view gave rise to tweets like the following,

but it seems the community might be already doing this.
(Thanks go to Martha for sending me a print copy of The Economist)

Anyway, I wish I could cover more of the lectures, but it seems I'm running out of space again. I'll conclude this post how John's lecture made me realize that LikeLines is similar to jQuery. It's a building block and like Lego, you can use it to build many other things on top. It also made me consider making LikeLines more like an API. In the coming days, I'm going to try and put these thoughts into the "show and sell" video for the final assignment.

Sunday, July 17, 2011

Knight-Mozilla Learning Lab – week #1

After submitting an idea to one of the Drumbeat MoJo challenges, I was invited to participate in the Knight-Mozilla Learning Lab. One of the requirements of this lab is to blog weekly about at least one the mandatory weekly lectures. Well, it's now time to blog. :)

The first lecture was given by Aza Raskin, former Creative Lead for Firefox. It was titled "How to prototype and influence people" and the talk's important message was that
"The value of an idea is 0,
unless it can be communicated."
While this sounds like a Captain Obvious statement, it's easier said than done. The means you choose influence on how well you can communicate your idea.

When Aza showed the above slide, I thought back to when I was working with my mentors on the LikeLines idea for the MoJo challenge. Back then, I was thinking on how to communicate our idea. It started out as a short write up by Martha, which I liked, but I felt that submitting the idea in this form would not be good enough. I decided that a video presentation would be the best way of communicating our idea.

However, I had no idea how. "The problem is that we don't understand the problem", Aza quoted Paul MacGready during the lecture. It took a few iterations, a few sketches and several discussions with Johan and Martha until I started to get a picture of how to present the idea. The discussions were quite fruitful —in the Learning Lab's second lecture, Burt Herman mentioned it is important to build a team to find people that complement you and I fully agree— and it took a few iterations for the deck of slides to mature and the script to become polished.

Still, there are things to work on. Aza ended the lecture you should sell a dream when communicating your idea. I find that I did not do this well enough in the video I submitted. If I were to redo the video again, I would make it more user-oriented, perhaps starting like this:

You notice that "Macy’s Day parade" is a trending topic on Twitter. You do a quick search and find the following videos:"Oh my, where do I start watching?", you might think. What are the interesting tidbits in this huge collection of almost 3000 videos? Well, don’t worry. With intelligent video players powered by LikeLines, finding the interesting bits is no problem at all[...]

Wrapping up, I found Aza's lecture inspiring and full of good points. I wish I also had time and space to discuss the optional third lecture this week by Amanda Cox (New York Times, graphics editor). I initially missed it, but I managed to watch the recording today. It was a very nice and recommendable lecture.

P.S.: While watching the missed lecture using the BBB player, I was really craving for a LikeLines-powered player. Time-based seek bars suck!

Tuesday, July 12, 2011

The Netherlands is (not) great for foreigners

The Netherlands is often considered to be a nice place for foreigners. Most of the Dutch people are able to converse at an acceptable level of English. This is great. If they need help, they can ask for it without much trouble at all.

But then there is this problem of written communication. It's in Dutch and it's a pain in the ass if you can't read it. At work, I'm one of the few in the group that's Dutch and colleagues often come to me when they need a translation. It ranges from letters from the Dutch Railways (NS) to error text messages from mobile network operators.

This made me wonder. If these companies managed to help my colleagues in (spoken) English in the past, why can't they continue to service them in English? Oh, wait. Right. Probably has something to do with software and automated messages...

Wednesday, July 6, 2011

Fixing unresponsive volume controls

On my Vista laptop (a Toshiba Tecra S10), the volume controls occasionally are unresponsive when coming out of hibernation. When this is the case, turning the volume dial causes the whole taskbar to freeze. To fix this, I have to
  • kill explorer.exe,
  • disable the Realtek audio device,
  • stop the Windows Audio service,
  • re-enable the Realtek audio device,
  • restart the Windows Audio service,
  • and, finally, restart explorer.exe.
Until now, I have performed these steps manually each time my volume controls stopped working. Today, I got tired of it and decided to automate this. ;)

My first attempt was just to write a simple DOS batch script. For this I needed a command line utility to enable and disable devices. Fortunately, Microsoft provides just the utility I'm looking for. :)

Using that utility is quite simple. After putting the executable in one of my PATH directories, I looked for the Realtek device (in an elevated command window):

C:\>devcon find * | find "Realtek"

HDAUDIO\FUNC_01&VEN_10EC&DEV_0268&SUBSYS_11790602&REV_1000\4&24AF6467&0&0001: Realtek High Definition Audio (With EC)

C:\>devcon find *VEN_10EC* && REM Let's see if this substring uniquely finds the Realtek device

HDAUDIO\FUNC_01&VEN_10EC&DEV_0268&SUBSYS_11790602&REV_1000\4&24AF6467&0&0001: Realtek High Definition Audio (With EC)
1 matching device(s) found.

C:\>REM Great! It does :)

After testing the devcon utility, I wrote the following batch script:

However, this script has a flaw. The script requires admin rights in order to make changes to devices and services. This is in itself is not a problem, but if the script is running with admin rights, then the final line of the script causes the explorer.exe process to be restarted with elevated rights. As a result, any process started by the new explorer.exe process, e.g., through the Run dialog (Win+R), will also have administrative powers!

So I decided to write a small C# program instead. Luckily, Microsoft provides some sample code that shows us how to launch an elevated process. Based on this example, I wrote the following program that launches itself to execute a few commands with elevated rights, after which it restarts explorer.exe using the access rights it was originally started with:

Perfect! Now I don't have to go manually through all these tedious steps ever again. :)