Talking about Open Source Software and Open Source Hardware at the Instituto Español Vicente Cañada-Blanch
(You can find this entry in Galician as well)
A month ago, on November 5th, I was invited to deliver a talk at the Instituto Español Vicente Cañada-Blanch, in Portobello, London, to a dozen 14-years old Galician language students.
The "Instituto Español Vicente Cañada-Blanch" is an Spanish school originally opened in Greenwich in 1972, later moved to Portobello in 1982, providing education to the children of Spanish migrants living in London. They have been teaching Galician since the 90s, since Portobello was a preferred location for Galician expats.
During the last three years, Xaime Varela, Galician teacher, invites people from Galicia to talk to his students, either about their jobs or their profiles. He reached me after I joined one of the several Facebook groups for Galician expats in the United Kingdom, so I proposed a talk about "Software e Hardware Libre nun mundo intelixente". I imagine he was a bit scared at the beginning: "they are only 14 years old!"-, but he was OK as soon as I explained I would adapt the contents to their age.
At Samsung they also liked the idea a lot, allowing me to take the day off on business travel, and handing out some freebies for the students.
So that was it: I could talk during about 45 minutes about Pontedeume -my home town-, A Coruña, Finland, cooking recipes (there is a clear resemblance between accessing source code in software and accessing some special recipe, in order to improve them), about collaborating via Internet... I also explained how mostly every device nowadays, from TVs to phones or tablets, has a certain amount of Free Software on it.
It was very satisfying: the students are amazing and talkative, were very interested, and made some very nice questions. They were delighted with the One Laptop Per Child project (they could try a prototype that Mario had lend me), were almost shocked about the endless possibilities of the 3D printers (like this father that built a low-cost prosthetic hand for his son), and loved my friend Xulio Coira's Open Pipe project.
All in all, it was a really nice experience that I can only recommend: I would really love to keep doing this kind of "evangelism"! Thanks a lot to Xaime for the opportunity and Samsung for the support!
A year and a half ago I published some pictures with the new changes that I was preparing in Butaca, hopefully "to be released soon". Unfortunately, there were some stability issues that I never had the time to investigate and fix properly, so all the new features have been sitting in GitHub for some time already.
As time went on, I had less and less time and motivation to do MeeGo development, and eventually I just assumed that only the brave people having Butaca built from upstream would benefit from the latest changes. This year, back in May, I received an email from The Movie Database announcing that the 2.1 API (the one used in Butaca) was reaching its End Of Life in 15th September, a bit less than a month from now.
I always thought I would just sit during a weekend, fix these stability changes and replace the API, but the truth is that after I moved to the UK, the kind of "relaxed weekend" needed for that doesn't seem to come too often. In short, I don't plan to update Butaca before this deadline, so it will stop working.
So what are your chances as an user? You can use Pop Flix: since they use Rotten Tomatoes, they shouldn't have any issues with deprecated APIs. Regarding your favourite movies and artists, they are saved in a very simple Sqlite database, so you can manually retrieve the values from there. Of course, since it is Open Source, you can go to the repository, fork it and do the changes yourself.
I really enjoyed developing Butaca. Although it didn't get to be extremely popular, it achieved more than 10000 downloads, and a really nice 5-star average of 74 reviews. Thanks to everyone who used it and enjoyed it, and specially to those who sent me an email with feedback... and even patches!
Since WebKit2 has a UIProcess and a WebProcess (and could potentially have other processes, take a look at the talk that my former colleague Martin gave at GUADEC), debugging WebKit2GTK+ it is a bit different from debugging WebKitGTK+: if the crash happens in the WebProcess, how do you attach gdb to it? Lately at Samsung we have been contributing quite actively, and since debugging is part of our daily workflow, I thought it would be interesting to share it.
In WebProcessMainGtk, you can find:
#ifndef NDEBUG if (g_getenv("WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH")) sleep(30); #endif
so you can export WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH, which will give you enough time to launch gdb and attach it to the WebProcess, something I do with:
gdb -p `pidof lt-WebKitWebProcess`
(I imagine you will need to provide the right PID if you happen to have more than one lt-WebKitWebProcess instance running).
In the case that you are debugging the IPC communication between the UIProcess and the WebProcess, you might want to launch both sides within gdb, like
Tools/jhbuild/jhbuild-wrapper --gtk run gdb --args WebKitBuild/Debug/Programs/MiniBrowser
These are the contents of my .gdbinit:
set history filename .gdb_history set history save on set breakpoint pending on python import sys sys.path.insert(0, "/path/to/WebKit/Tools/gdb/") import webkit
The interesting bits there are saving the history, so you can interactively search your past history for expressions, breakpoints or whatever. The "set breakpoint pending on" is also nice if you save breakpoints into a file, since they symbols are usually loaded
dynamically later, and by default, when reading them with "source", they won't be found and will be ignored instead of left pending. Finally, WebKit provides a set of nice PrettyPrinters, so you can visually inspect the values of the most common data types.
Additionally, you might want to use
(gdb) handle SIG34 nostop
since that is a signal often received that can be a bit annoying when debugging.
You might face a similar challenge if you want to debug the LayoutTests: how do you attach to the each process? Which are the binaries? What environment variables do you need to set, and how do you deal with time outs? And what if you are debugging a test that needs a web server?
In this case, you're probably interested in using
Tools/jhbuild/jhbuild-wrapper --gtk run gdb --args WebKitBuild/Debug/Programs/WebKitTestRunner
also with the same gdb -p `pidof lt-WebKitWebProcess` additional bit. But here we need to set some environment variables first (assuming $WEBKIT_HOME is /path/to/WebKit):
export TEST_RUNNER_TEST_PLUGIN_PATH=/path/to/.libs/ export TEST_RUNNER_INJECTED_BUNDLE_FILENAME=/path/to/libTestRunnerInjectedBundle.la
The previous path is usually $WEBKIT_HOME/WebKitBuild/Debug/Libraries. As for the web server bit, I have an Apache server installed with one virtual host pointing to a directory in my home directory, so I just put there the tests I need to debug.
There are probably many different approaches to debugging: some people use logs and printfs, because they are very familiar with the code and already suspect where to start looking: for those, there are interesting channel logs that you can enable (although this has changed recently, take a look at r153736. Others generate core files and do post-mortem debugging with gdb, and others do live-debugging.
For additional references, check:
Mario already shared last week the effort he has been lately putting on accessibility in WebKit. Besides that, and among other things, here at Samsung we have been also paying attention to memory usage.
Two months ago, my colleague Brian introduced a memory leak detection tool for the GTK port in WebKit –although it could be easily extended to other ports where valgrind is available. This tool hooks into run-webkit-tests, and when the
--leaks flag is used together with
--wrapper, it launches
DumpRenderTree under valgrind, gets the leaks found and parses them to generate a report.
There are some differences between how valgrind works and how the leak-tool in Mac works, so while most of the design of
run-webkit-tests can be reused (hooking, for example, into
--print_leaks_summary), there are some additional pieces that need to be done, such as passing
--wrapper as well. Anyway, not having to pass
--wrapper is in the roadmap as a future improvement.
You can take a look at the patch here and contribute to the discussion with additional design ideas. Or simply apply it locally and use it to detect leaks: Brian has already done that with a set of the LayoutTests, finding and fixing a number of leaks.
It is amazing how fast time goes: it feels it was yesterday when I wrote that I had started looking for a new job, and after some time doing interviews, I joined Samsung at their Research Center in the UK.
It's been three months working here already, and things are going very well. The work here at Samsung is really interesting, and I am part of a team working on DTV, with a particular focus on the WebKitGTK+ project. I am (again!) surrounded by great developers, and I am already learning a lot!
The worst part about moving abroad was packing everything, putting all our belongings into boxes, and watching the empty space they left, but the rest was quite easy. My girlfriend and I initially stayed in a serviced apartment in Staines (a town right next to London where Samsung has these research offices), and we've just recently moved to Richmond: a really nice borough in London, still close by train to Staines, and more convenient to enjoy all that London can offer (and it offers a lot!). Besides, we are already bringing in all our stuff, so the new place is already looking like a home!
I plan to write here in my blog about some of the things we are doing at Samsung, but I will leave that for another post: in the meanwhile, you can enjoy the picture
I left my job at Igalia at the beginning of this month, after a bit more than two years working there.
These past two years have been incredible: I was living in Finland for almost the whole 2011, participating in the MeeGo project, and then spent 2012 working from A Coruña's offices, working on WebKit and other technologies. I enjoyed it a lot, got really attached to the people there -- some of them I call friends now --, and grew a lot professionally.
Igalia is organized in a flat structure, where we take more responsibilities than just coding, and where the ultimate step is to become a partner. However, I currently have the feeling that I want to focus more on the technical side of things, to gain more expertise, and that would be too complicated without neglecting these other responsibilities -- the kind of responsibilities that take time and energy. Then, being honest with my colleagues, the responsible thing was leaving.
I have only started looking for new opportunities since I announced my decision, so things are still a bit unclear. We will be quite probably leaving Spain and heading North: we would like to go to The Netherlands, but we don't discard anything in advance.
If your company needs a Software Engineer, chances are I could be of help, so take a look at my profile in LinkedIn, and don't hesitate to ask me for my CV or other details. And, if you're so kind, please pass the word and help me find a new cool place!
Claudio wrote a pretty good blog post giving an overview of the hackfest , explaining who was doing what, so I'll just mention that I focused on improving the WebKit2GTK+ port sections documentation (because, you know, we don't want this to happen). You can see here how scarce it was looking previously:
and how it looks now:
That's just the short description, but each of those sections has also an extended description that tries to give an idea of how to use it. Still, if something is not clear enough, just file a bug and we'll try to improve it.
This updated documentation will be available at the WebKit2GTK+ Reference Manual in the next release, but since it's already upstream, you can build it yourself simply passing the
I also want to thank the GNOME Foundation and all the sponsors who have made this event possible:
A couple of weeks ago, we at Igalia got a number of plugins published in the Nokia Store: Enlarge & Shrink, Gallery Tilt Shift plugin, and Facerecognition Reset Plugin. We had them ready for some time already, but still it was very difficult to pass the Nokia Store Quality Assurance: there is a list of valid directories where a Debian package can install its files, and they had missed the ones for Gallery plugins. So, in order to finally get over that problem, my friend and colleague Andrés had to "fight" with the Store QA people quite a bit: don't forget to thank him for this!
Although I developed only the Tilt Shift one, I will briefly introduce you the other two as well
The Enlarge & Shrink plugin is an add-on to the built-in Gallery application. You can use it to apply a radial distortion to a picture, so they look like enlarge and shrink effects (also known as punch or pinch).
The Face Recognition Reset plugin also behaves as an add-on, but doesn't work on individual images. Instead, it forces the deletion or un/protection of the facerecognition database, something that you might need if for whatever reason the database gets corrupted.
And finally, the Tilt Shift plugin lets you make a picture look as a miniature, by applying the following transformations:
- Blurring the image using a Gaussian Blur filter
- Keep an area of the image focused (either vertically or horizontally)
- Combine both parts of the image using a Gaussian filter (so the focus is lost gradually from the focused area to the rest of the image)
- Increase the saturation, so the colors seems those of a miniature
There is a problem, however. Gallery uses Quill, and Quill was designed to use tiles in order to minimize the memory footprint and work happily in mobile devices. That tiling mechanism finally proved to be less flexible than it should, so for those edit operations where you can't rely only on the local information in the tile... things won't work.
You can still use these plugins for small images. Gallery doesn't do tiling on images of 512x512px or smaller, so that is what is currently supported. Another option is writing a complete new application to get this miniature effect (either using Quill with a different tiling configuration or not using it at all). You can check the full explanation at the GitHub page of the project.
Take a look at all applications published by Igalia at the Nokia Store.
Some days ago, I talked about my current living-room setup. It is cool, since I'm reusing components I already have, but it's quite clear that it has some issues:
- It won't extend well. If I ever want to browse my Flickr pictures, that won't be enough
- The same goes for videos (Youtube, Vimeo, blip.tv...)
- And many other services out there
- The TV supports part of the content, the XBoxsupports another part...
- The UI for the UPnP clients is quite basic
TVs are no longer regular TVs: they are smart! (Think about the Panasonic Viera, Samsung Smart TVs, Philips SmartTV...). Many other devices have many different multimedia capabilities: some of them dedicated (Asus O!Play,Blusens Blubrain...) others are gaming devices that include these features (PS3, XBox...).
They solve different subsets of the problem: for example, providing Flickr, Youtube, Vimeo... applications, or having a better UPnP client, or even providing application markets so you get new apps for new services. But for that to happen, some developer has to provide the apps, maybe having to learn the API for a web service: none of these devices solve the need for a unified path, for a single experience, both from the developer and the user point of view.
- A single, high-level API that abstracts the differences among various media content providers, allowing application developers to integrate content from various services and sources easily.
- A collection of plugins for accessing content from various media providers. Developers can share efforts and code by writing plugins for the framework that are application agnostic.
- A flexible API that allows plugin developers to write plugins of various kinds.
Hardware vendors shipping their products with Grilo in their SDKs would expose to third party developers consistent APIs to access the different media providers. Developers targeting those platforms would only have to care about Grilo's API, since most popular media providers are already supported out of the box, and only if a service is very new (or less popular) they would have to write a plugin for it. One consequence for this is that developers will have more time to focus on what will let them differentiate from their competitors: the UI.
Users would finally get revolutionary experiences, where, for example, videos or pictures from different sources would be together, or where the application would be interactive and gesture-driven. Or anything you could imagine!
Check its official page in the GNOME project for all the details, its page at Igalia, or Grilo at Ohloh for past blog posts and other information. Also, if you come to Coruña for the GUADEC, don't hesitate to ask any igalian about it!
Since I bought a Panasonic Viera TV, some 5 months ago, I had been connecting my laptop to it whenever I wanted to watch a movie, some series or even the pictures I took on my trips.
That was quite annoying: the VGA connection (since the laptop only has HDMI output in its dockstation), checking that the laptop had enough battery (or adding yet more wires to keep it plugged), connecting it to some external speakers... and all of this while having a SheevaPlug almost 24/7.
So a couple of weeks ago I bought an external drive and configured it as a media server. This is my setup now, in case someone is interested:
- First generation SheevaPlug with the HDD Western Digital 2TB My Book
- Panasonic Viera TV
- minidlna. With a very simple configuration, it exposes your media content and works great with Viera's integrated upnp client.
- Viera is able to use external srt subtitle files for some of the supported formats (typically avi or mp4), but that won't work with mkv.
- In that case, you can add a new subtitles track to your mkv (for example, using mkvmerge, from the mkvtoolnix package)
Viera is quite picky sometimes. If you create your own mkvs with mkvmerge, be sure not to add compression (check compression:none parameter). By default, mkvmerge tries to compress the header of the audio track (and most players are fine with that, but Viera is not)
I currently use something like the following to add a subtitles track:
mkvmerge -o output.mkv --compression -1:none file.mkv file.srt
Not only that: Viera seems to support a limited set of encodings for subtitles. LATIN1 is known to work fine, so if you have your subtitles in UTF, you can use unaccent and iconv to convert them to LATIN1.
cat subtitles-utf.srt | unaccent LATIN1 | iconv -f UTF-8 -t LATIN1 -c > subtitles-latin1.srt
And the previous script helps me striping non-LATIN1 characters out of a subtitles file.