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!

Attending FOSDEM 2018

On Friday I will attend FOSDEM 2018 after having missing last year’s (but I had a good excuse).

It’s pretty sad that there’s no longer a Desktop devroom, but there is still plenty of other interesting topics to follow.

Thanks to my company Endless for making my attendance easier, and if you’re willing to know more about the problems we’re solving just reach out, as FOSDEM is the perfect place for that!

FOSDEM

Have a great 2018!

I have spent most of December with my family in Portugal and, as it’s becoming tradition, Helena and I (and the kids) are spending the New Year’s eve alone at our place. It gets more and more difficult to say good bye to our family every time we need to come back, especially now that Olivia really enjoys being there and spending time with the grandparents. But I come back with my batteries charged, ready for the coming year.

This year, similar to 2014, will be one that we will never forget because of the birth of our second child, Gil. Gil is a force of Nature! So different from the quiet baby that Olivia was; he always has energy and is (almost) always smiling. But even though we are usually very tired, it’s also much more interesting that they are different like that.
Life is certainly more challenging with two babies than with one, it’s not a linear relation of “2 × kid = 2 × work”, but having a flexible schedule, an understanding manager, and an awesome wife, allows me to manage.

To add more challenges to our personal life, we have also moved to a new place (still in Berlin) this year. The move was already going to be tricky since we did it ourselves instead of hiring a company, but it became boss-like when I got injured in my leg (tore muscle) while playing squash 4 days before we rented a truck and were supposed to carry all big items in it. But that’s gone, and we love our new place!

Even if it was a good year for me personally, in terms of global events, 2017 seemed pretty much the continuation of the shitty ending of 2016. That feeling of “end of the world” was still present all over the news and general day to day talk. In Portugal, the 3rd safest country in the world, more than 100 people were killed by wildfires, and the year has had a dangerous drought, to the point of having to distribute water by train/trucks to some cities… But sure, it’s chilly in some places so global warming must be just a hoax
Luckily the 2017’s big elections in Europe (France, the Netherlands, and Germany), which could set the Union on fire, proved that people can still choose the better route for their lives, despite all the attempts of scaring them off. The current situation in the EU is still alarming but at least it held better than I thought it would.

Workwise, it’s been another very busy year at Endless. I am still in charge of the App Center (our GNOME Software fork) and doing what I can to tame this beast. Endless’ mission has always been a noble one, but with the current direction of the world it’s even more significant and needed; so I will continue to give my best and hope we can keep making a difference in less fortunate regions. If you want to help, check out our job openings.

I really hope 2018 is a great year, with more hope than the past few years. So everybody reading this, have a great 2018!