Going to FOSDEM 2019

It’s that time of the year again! Tomorrow I am flying to Brussels for what will be my 11th FOSDEM!

I will be carrying the Hack Computer (+ cool stickers) with me and I am happy to give a quick demo and talk about this new project or Endless with anyone interested.

Such a mean machine!

Looking forward to meeting everybody!

Ready for 2019

This blog has not had many posts in 2018 but the “new year’s post” is almost mandatory, so here it goes.

Family

December was similar to last year, spending most of the time in Portugal with the family and coming back to Berlin right before the New Year’s eve.
After 3 years in Berlin, I think I am finally reconciled with the oddities/particularities of the city, my German is improving, and I do enjoy living in here more than last year. We do miss our friends in Geneva and other places, and of course it’s ever more and more difficult to leave our family in Portugal after seeing how much our son and our daughter enjoy being with the grandparents and cousins.

A picture of Lagos in Portugal, showing a landscape with big rocks and a cliff by the sea.

Lagos, Portugal, where I spent part of my vacation

Still on the personal side, the biggest event this year has been my daughter’s surgery. She needed a throat surgery to remove part of her tonsils, in order to breath and sleep better, among other things that would improve as a result (having more energy, eating and growing more, etc.). It was a “simple” throat surgery, but not without risks (we spent 5 days in the hospital for the post-surgery recovery and observation). I tried to explain it to her as if it were a special sleep-over at the hospital where the folks there would help her breath and sleep better, so much that she was disappointed when we had to reschedule the surgery 3 times (2 times because she was sick, 1 time because the hospital organization is not the best and they lost our appointment!). She faced the event like the brave girl she is and she was always patient too. In the end, the results were amazing and could be seen almost immediately: she now has much more energy, sleeps well, eats and speaks better… like night and day!
I hope my son doesn’t have the same condition, but judging on how much energy, strength, and overall physical agility he has, I’d say he’s fine 🙂

I cannot emphasize enough though, that even if the surgery scheduling was a mess, the surgery and post-surgery care could not have been better. From the doctors, to the nurses, and other assistants, everybody was really nice, patient, and professional. Having any surgery on your child is always something very delicate and challenging to deal with, and the staff did make me feel like my daughter was in the best hands possible. Of course, this care was the same anyone would get with a normal/public coverage in Germany, and thus it’s even more remarkable. Even though in the EU we sometimes take Universal Health Coverage for granted, it’s good to remind ourselves how precious it is.

Work

2018 also meant some changes in my daily work at Endless as I joined a new team to help deliver a new project with a different type of users. This project is called Hack, and aims to deliver a desktop computer experience that integrates elements to teach programming and computing concepts to users from age 8 and up. This also meant that I traveled twice to work with the rest of the team from the San Francisco office, and it’s always nice to hang out with my colleagues directly.
We have already shipped the first computers around Christmas in a great effort from everyone involved (in this team and others), and I am proud of what we’ve achieved! There is still a lot of work to be done, so be sure to follow the news about the project.

With this new project and being a father of two means I didn’t really have much more time/energy left for side projects but I still managed to give a presentation about ostree and Flatpak at CERN, and at the Linux Technologies Berlin meetup, which I really enjoyed and hope to have the opportunity of giving more presentations this new year too.

I guess that’s already a good enough summary for the small attention span we all have in this decade, so I will leave it here.

Have a great 2019, everyone!

I’ve built a box

This is not the typical post I use to write (which is usually about what I do at work, often related to GNOME, so if you’re not interested, just skip it…). But a couple of months ago I did something different that I still want to write about. That thing was a wooden box (sorry if you were expecting a Gavin Box) that I was asked to carve by my brother for his wedding, to be used for carrying the wedding rings.

The wedding had a Game of Thrones’s theme (there was not blood in it though, if you’re wondering), so naturally my brother wanted some of that in the box. Thus, my initial idea was to just buy a box and carve something to do with GoT and include their names. Something like this, as my brother sent me for inspiration.

However, upon ordering some box online, I noticed that not only was the box too small to carve (and the Targaryen’s dragon has a lot of details), it was also extremely poor quality: the wood was too light, the hinges were so loose they made clicking sounds just by moving the box. I also couldn’t find other boxes that seemed to fit my requirements online, so I resorted to building one myself.
When I was a kid, I loved to make stuff with wood, and I would use some spares from a local carpentry to build stuff like tiny houses, swords, crossbows, … So building a box shouldn’t be so difficult. I went and bought the wood, but the only issue actually was that I had only a handsaw… And cutting straight with a handsaw is not easy. So I had to borrow an electrical circular saw from my friend Chris, who also let me borrow a few other useful tools like clamps (thank you for that) which helped a lot when I glued the pieces together.

Block of wood covered with a print of the box's cover design, showing the Targaryen and Stark's crests + the names Nádea and Luís, with a wedding ring between them, and the date July 9 2018

The pencil drawings on the wooden lid

Close-up of carving the House Stark's wolf

Close-up of the name Nádea carved on the wooden lid

After I had the box glued together and the lid cut out, I felt it had some rough look but I liked that. So I proceeded with the carving. I put together the design I wanted on Inkscape and transferred it to the lid, then proceeded with the carving, using a nice tool set I bought online. I had never really carved anything worth before, so after a few rough beginnings I got it as I wanted. The letters were, as expected, extremely tricky, but I found the whole activity very zen. Since I work usually until a bit later in the evening, and we need to put the kids to bed, etc., on week days I’d just do a couple of letters after dinner, which would take me around one hour or so.
In the beginning I was going to carve only the design elements, but my artistic wife told me that maybe I should just carve the space between the elements too, and I am happy I listened to her. In the end, I decided to do these long carved waves all over the sides of the box too, and I am glad with the effect. The inside of the lid was also looking very flat (it was a single piece of wood), so I carved it in just for it too look more like a traditional box lid.Wooden lid with all the elements carved, but the date on it shows still an L which would be for July since I made a mistake with the date.

Like any decent software engineer, this project couldn’t go bug free. Turns out I made a mistake in the date, printing JUL instead of JUN… And I only noticed it after I had carved the L letter and realized that July would be after our flight back from Portugal (and moving the wedding to accommodate my error was inconvenient). So I had to fix it by making the L disappear and changing the date style (since there was no more space left).

Lid with all the elements and space in-between carved

Inside part of the lid, showing a carved-in  wave-like pattern

Bottom part of the box

The inside of the lid already with the closing magnet and painted.

The final steps were to add a closing mechanism (a hole to insert a small round magnet, to hold the lid and the bottom of the box together), paint it with a wood-special paint, and add the hinges (which was a bit challenging since I did it only using the carving tools and sandpaper).

Final box viewed from above and back, showing the silver color hinges.

Final box viewed from the front.

Since the purpose was for it to carry the wedding rings, I bought some wine color fabric, stuffed it with whatever-the-stuffing-material-is-called, and added a couple of strings for tying the rings (unfortunately I forgot to take a photo of it). The interior was not glued to the box, as I wanted it to be used after the wedding for whatever they want.

And that was it! It took me more than a month in total, but I am quite happy with the result and enjoyed the process a lot. Working with a computer all day, there’s something very relaxing about doing something more physical with one’s hands. So if your work and free time usually involve staring at a screen, and you feel like you could use an artistic hobby, I hope this post inspires you to do some wood carving.

ostree & Flatpak at CERN

A week and a half ago I spent a few days in Geneva and gave a presentation about ostree and Flatpak at the CERN Computing Seminar. I started by briefly introducing Endless to give some context of the problems we’re trying to solve and how we’re using ostree and Flatpak for that, then proceeded to talk more in detail about these technologies. In the end, there were several questions, and I was happy to learn afterwards that among the audience there were some of the people working at the CVMFS project: a software distribution service to help deploy data-processing infrastructure and tools. I don’t know the full details about the project’s implementation, but from the problems they’re trying to solve it seems like ostree (or more specifically libostree) could perhaps be used to replace part of the core, which would leverage all the niceties of using a complex Open Source project (more eyeballs looking into bugs, more testing, etc.). I also think more use-cases could be found in the organization, so I hope my talk was a small seed to help introduce these projects at CERN in the medium/long term. The presentation has been recorded if you’re interested.

Getting authorization to access CERN this time was also different, as for the first time I got an entrance pass as a member of the CERN Alumni. So I would like to thank Antonella Del Rosso for the Alumni initiative and also for allowing me to kindly borrow her EU-CH power adapter when I forgot mine at my friends’ home. In the end Antonella also interviewed me about my experience at CERN and after I left, and produced this summary if you want to check it out.
I would also like to thank Miguel Ángel Marquina of the CERN Computing Seminar for organizing the presentation and all the details around it.

Photo showing the author and his daughter sitting close to the lake in Geneva.

Sitting by the lake with my daughter

Having spent more than 2 years in the region, it is the friends we have there that we miss the most. So it was great to meet them and old colleagues again.
My family traveled there with me and we stayed with friends from Spain, so it was funny to see our daughter (who used to play with those friends’ kids all the time when we lived there) excusing her shyness for not speaking Spanish. But after a day or two they were all successfully playing together; it’s amazing how children can get along no matter what differences or barriers they find, while adults often resort to stupid feelings and dangerous actions.
The mountains landscape is another thing we miss in Berlin and the Spring’s clear weather allowed us to fully gaze at the Jura or the Mont Blanc which should last us for another few more months. After that, I guess I’ll try to find some graffiti of mountains around Berlin 🙂

Updates on the Endless App Center / GNOME Software

The great majority of my work at Endless is to (try to) tame GNOME Software and apply the changes that make it what we simply call “the App Center” (repo here) in the Endless OS.
This is a lot of work and usually I’d love to share more often what I am doing but end up neglecting the blog due to the lack of time. So here’s a summary of what I have done the past few months.

New App Tiles

From the times where it was called the App Store (and not based on GNOME Software like know), the Endless OS’s App Center used to have what we called internally as “app thumbnails”. These were images carefully produced for each app that Endless distributed, that worked as a way to provide some visual hint and attractiveness that is many times not achieved by the apps’ own icons. Here’s a screenshot of that version:

Old version of App Center in the Endless OS: displays colorful images in squares representing the apps available

Old version of the App Center


There was a couple of problems with “app thumbnails” like that: 1) we started shipping Flathub as a remote by default, and it’s simply not scalable to go and create an image for every app that is available in the repository; and 2) even if visually appealing, the app tiles make it a bit difficult to correctly display text on them, and depending on how apps appear next to each other, it can become visually quite bloated.

Thus the solution we came up with for the 2nd problem was to give dim a little bit the effect that the thumbnails have by placing a translucid layer on top of them, and to have a dedicated area for textual information. This means we still use app thumbnails for the apps that have it, but they will all seem a bit less intense and more alike.
That still leaves us with the first problem of not having thumbnails for most apps. For fixing that we create a background from the main colors presented in the app’s logo. The background is composed of 4 gradients, each with one of the icon’s main colors. Using the logos’ colors ensures there’s some harmony between the logos and their backgrounds, and I am very happy with the result:

Generated backgrounds for apps: shows squares where the background is a mix of gradients with colors picked from the app's icon

Automatically generated backgrounds for apps

Combination of app tiles that have a thumbnail image, and some that have automatically generated backgournds

Updates from USB and LAN

As you know, Endless’ mission is to give access to computers (and all that comes with them: knowledge, entertainment, productivity) to those who are often in remote areas, with very weak or innexistent connectivity. Maybe you’ve already heard that at Endless we’re developing an “asynchronous internet” and optimize the use of the little data connectivity some of our users have. So it’s only logical that we can give the possibility for users to share the data among themselves without an internet connection. To do that, we (more specifically Philip Withnall, kudos to him!) have implemented a way in ostree for local repositories to be found, particularly, repositories in removable drives (e.g. USB keys) and LAN. This means that e.g. a teacher’s computer in a class room can download app updates from the interwebs and the sudents’ computers will just get the updates through LAN (without the need for an external connection). In the case of the USB, as you probably guessed, a user can just set up a repository in a USB, and share the drive with friends.
For the USB case, in which the number of apps available may differ a lot from the user machine’s catalog, we need to show which of those apps are available, so when inserting the USB drive in the machine, the App Center should just pop up and show a new category “USB” with the apps that are contained in it. See the following screenshot:

App Center showing the one app in an inserted USB  key, as a category

App Center showing the one app in an inserted USB key

Performance Constraints

One of our constant concerns is that our OS and apps run smoothly even on less powerful machines, since it’s what many of our users have. GNOME Software spawns a thread for every main operation that the user does, like installing or updating an app, and we’ve noticed that when a few of these operations are running in parallel, some machines will just freeze. Moreover, downloading a bunch of data in parallel may easily occupy the whole bandwidth without actually completing any of the downloads.
One can think of a lot of smart approaches for dealing with this, but for now we just implemented a restriction on the number of operations that can be run in parallel. This was implemented together with upstream and the number of possible operations in parallel is one per GB of RAM. You may argue this is good a heuristic as any other, but it gives a low number of operations for slower machines, while still allowing powerful machines to have multiple parallel operations.
For the Endless OS we just opted to limit this number to 1, but may revisit it later. Google Play also performs just one update/install at a time, so this is not such a crazy thing.

We need also to inform the user that an app is waiting for it’s turn to install/update, so in such cases an empty progress bar with a message is shown:

An app waiting for its turn to be updated: has an empty progress bar with the message "Pending update..." on top.

An app waiting for its turn to be updated

For consistency, we’ve changed also how we showed the “queued-for-install” state (a state that happens when the user clicks install and there’s no internet connection), to be consistent with the UI shown above.

Auto Updates

Another push we’re taking together with upstream is auto-updates. GNOME Software has had something similar to auto-updates for a while, though it was more like auto-downloads. This was heavily based on the fact that it’s not very safe to just go and install new versions of packages right away (apps may be running… ). So it’s up to the user to choose when to (reboot and) install those.
Flatpak though, has no such problems. Apps can be updated even while running, as the way the new update replaces an existing version happens atomically, without touching the running app’s files.

So the ideal thing to do for Flatpak is to have real auto-updates (that is, download and deploy them right away). But since GNOME Software still has to support other sorts of app distribution, it required a bit of creativity when designing the new UI for this, which Allan Day kindly did, and very patiently with me and all my opinionated views of it 🙂

I have implemented auto-updates downstream first, without some of the niceties of the new mockups, since we needed them for our very-soo-to-come new version. But the idea is to do the real implementation upstream soon.
Surely enough, even when turned on, auto-updates only happen when on unmetered connections currently; and Philip Withnall is working on a creative solution for metered connections (soon to be announced).

Misc Fixes

This post is long enough so it’s not really sensible to enumerate all the fixes done in the last months. So I will just mention that recently we have fixed important issues (upstream as well) like installing new runtimes’ extensions when an app update needs them; cancelling auto updates/downloads when their running and the connection is switched to a metered one; setting an app as updatable if one of its runtime extensions has an update (otherwise it was not possible to install those extensions), etc.

If you’re still reading this, thank you! But especially thanks to Richard and Allan for their patience and leadership upstream!
Hope you liked this. I will try to keep the updates more frequent!