There’s hardly a better way to spend a sunday diving, even in early fall when the weather gets a little colder and rainier. We went to Zeeland, at the Dutch coast, to a divespot named Langedijk for two shallow shore dives. The water was a somewhat brisk 14°C, but our drysuits kept us toasty even through long dives.
In one of my latest blogs, I’ve explained what convergence is, how Plasma benefits from it, and why we consider it a goal for Plasma. This time around, I’ll explain the how, how it works across the stack and how we implemented it. Naturally, this article dives a lot deeper, technically, than my previous one.
Convergence plays a role at different levels of the whole software stack. In this, more technical article, I’ll look at different layers of the software stack, from boot/kernel and middleware to UI controls and overall layout and input methods. After reading this article, you’ll understand how Plasma allows to use the same software on a range of devices, which parts are different, and where code sharing makes sense, and thus happens.
Keep in mind that Convergence, at least for Plasma, doesn’t mean that we ship a lowest-common denominator UI so it “kind of” runs on all things computer, but that it provides a toolbox to build customized UIs that allow taking advantage of specific characteristics of a given target device.
Lower Levels and Packaging
One aspect of convergence that is of course the deployment side. This doesn’t just include the kernel and bootloader, which needs to be compiled differently for ARM devices and for x86 devices. The rest of the stack is by now largely the same. We are now using the same set of packages and CI for both, mobile and desktop builds, in fact most packages are the same, and the difference between a device set up for mobile use cases and desktop is the selection of packages, and what gets started by default. Everything is integrated to a very large degree, lots of work is shared which means timely updates across the device spectrum we serve.
When it comes to user interface controls, such as buttons, text fields, etc., convergence is mostly a solved problem. Touch input is possible, Qt nowadays even ships a virtual keyboard (which Plasma uses for example for password input in the lock-screen), and buttons react to touch events as well. QtQuick-based user interfaces often work quite well with both, keyboard/mouse and touch input, in fact touch is one of the design goals of QtQuick.
Not everything is perfect yet, however, especially text selection and keyboard control of QtQuick-based UIs often still requires custom-code, meaning it needs more development and maintainance time to get right. QWidget-based UIs are still a bit ahead of the game here, though often the benefits of also being able to deploy an app on touch devices (such as many Android devices out there!) make QtQuick an attractive technology to use. We see more and more QtQuick-based applications, as this technology matures also for desktop use-cases.
Plasma is made of widgets. Even in a standard Plasma desktop, everything is a widget: The menu in the bottom left is a widget, the task manager is, the system tray is a widget, and there are widgets inside the system tray for notifications, battery, sound, network, etc.. Plasma is widgets.
These widgets can be used on any device of course, but it doesn’t always make sense. Some of these widgets are very specific for desktops. The task-manager (that thing you use to switch windows, which is usually located in center of the bottom panel) doesn’t really make sense on a mobile device. For a mobile device, which needs larger areas to touch, something more aking to a full-screen window switcher is useful (and in fact what we use for Plasma Mobile). Other widgets, such as the network connections widget or battery and brightness widgets are perfectly suitable also for mobile devices. Plasma’s architecture allows us to re-use the components that need no or just little changes and use them across devices. That means we can concentrate on the missing bits for each device, and that in turn means we can deliver a feature-rich and consistent UI across devices much easier, while making sure the specific characteristics of a given form-factor are used to their fullest extent.
Again, by sharing the components that make sense to share, we can deliver higher quality features for a given devices with less effort, and thus quicker.
Shell and Look & Feel
Plasma can dynamically load different so-called shell packages. The shell package defines the overall layout of the workspace environment. On the desktop, it says that there’s a fullscreen wallpaper background, with a folderview, a panel at the bottom and the widgets which are loaded into that panel: application launcher, task-manager, system tray and clock for example.
The shell package is different for each device, as this defines the overall workflow, which is highly dependent on the type of device.
To take differences between devices even further, Plasma has the concept of “Look and Feel” packages, which allow further specilialization how a device, well, looks and feels. There’s the widget style and the wallpaper of course. The Look and feel package also defines interaction patterns, such as if a settings interface should use “instant apply” when a setting is changed, or if it should present an “Apply and Okay” button for the user to save settings. Mobile devices typically use instant apply, while desktop interfaces (at least Plasma’s) use the “Apply and Okay” concept throughout. For Plasma UIs, this can be changed dynamically. Plasma’s Look and Feel features is not just useful in the convergence aspect, it allows also for example to switch between a traditional default Plasma setup and a workspace that closely resembles Unity. These “Look and Feel” packages are available through the KDE store, so they’re easy to install and share. There’s even a cool tool that allows you to create your own Look and Feel packages, very much like themes.
Finally, at application level, we see more and more convergent applications. Kirigami, a high-level toolkit that supplied components for consistent, touch- and keyboard/mouse-friendly application nagivation and layout makes it very easy to create applications with responsive UIs that adapt well to screen size and density and that show flexibility in their input methods. This doesn’t just work between Laptops and phones, but also allows to create one app that works equally well on desktops, laptops, phones and tablets.
Kirigami complements Plasma’s convergence feature on application side, and we recommend it for most newly developed apps. With Qt and QtQuick being a viable target for Android devices, it increases the possible target audience by a very large degree. As an example, Subsurface Mobile, an application for scuba divers, uses Kirigami and works on Linux desktops, Android and iOS, all from the same code-base.
Make it happen…
If you like the idea of convergence, why not join KDE and help us work on Plasma? Perhaps you’d love to see Plasma on a mobile phone? In that case, consider backing the crowdfunding campaign for the librem5 so we can build a convergent phone!
Today, we went out onto the North Sea for a day of maritime training, a course how to rescue, survive and help in the case of being lost at sea, or going overboard from a ship at high sea. The course was extremely valuable towards my long-term goal of being able to do clean-ups of North Sea shipwrecks from ghost nets, abandoned fishing nets which harm marine life.
We went out this morning for two hours of class-room training and then boarded a ship and went out to sea, where we learned how to use flares, smoking pots, floats and various means to rescue men over board and victims of drowning.
This training was organized by Get Wet. I can highly recommend it.
I’ve been trying macro photography and using the depth of field to make the subject of my photos stand out more from the background. This photo of a parrotfish shows promising results beyond “blurry fish butt” quality. I’ll definitely use this technique more often in the future, especially for colorful fish with colorful coral in the background.
This morning, on a dive at Sha’ab Iris, off the coast of Hurghada in the Red Sea, a white tip reef shark visited us for a swim-by.
As a founding member of our surf club, I’ve decided to do what what was long overdue and took my second surfing lesson.
I went to a surfschool in Scheveningen at the North Sea, got in touch with an instructor, and after going over the water situation, currents, swell and technique, we went into the water for a good one and a half hours. There was a good swell, and next to the harbour’s pier, we were mostly out of the wind. After building up some skills, like catching waves and paddling into them, I managed to ride out a few waves, onto the beach. Not over a long distance, but at least I didn’t fall for a few seconds, a few times. Pretty good progress. Next try planned on sunday, weather allowing. It’s still the North Sea, and it’s still winter, so things can get nasty…
The water temperature was 9°C, which seems cold. I wore my 7mm full-length suit, 3mm gloves and a 5mm hood. It didn’t feel cold even in my fingertops after getting out of the water, so even in March, the North Sea is already very manageable.
Surfing was great fun, it’s an interesting break from diving in that it’s much more physically active. In diving, you tend to spend as little energy on anything as possible. That means that if you’re a good diver (and in the right conditions), you actually burn very little energy. That means you’re getting cold much quicker. Bodysurfing, on the other hand means that you’re constantly moving through the swell, swimming, paddling, getting up, falling, so you end up burning a lot of energy. The cold splash of water is really welcome then.
As opposed to diving, there is no buddy system in surfing, so you can go surfing on your own (under the right conditions, of course). That makes it a bit more flexible than diving. It also trains different muscle groups, especially arms and shoulders, so it complements diving well.
Waves are awesome. :)
I’ve always loved diving down while snorkeling or swimming, and it’s been intriguing to me how long I can hold my breath, how far and deep I could go just like that. (The answer so far, 14m.)
Last week, I met with Jeanine Grasmeijer. Jeanine is one of the world’s top freedivers, two times world record holder, 11 times Dutch national record holder. She can hold her breath for longer than 7 minutes. Just last month she dove down to -92m without fins. (For the mathematically challenged, that’s 6.6 times 14m.)
Jeanine showed me how to not breathe properly.
We started with relaxation and breathing exercises on dry land. Deep relaxation, breathing using the proper and most effective technique, then holding breath and recovering.
In the water, this actually got a bit easier. Water has better pressure characteristics on the lungs, and the mammalian diving reflex helps shutting off the air ways, leading to a yet more efficient breath hold. A cycle starts with breathing in the water through the snorkel for a few minutes, focusing on a calm and regular, relaxed breathing rhythm. After a few cycles of static apnea (breath holding under water, no movement), I passed the three-minute-mark at 3:10.
We then moved on to dynamic apnea (swimming a horizontal distance under water on one breath). Jeanine did a careful weight check with me, making sure my position would need as little as possible correction movements while swimming. With a reasonable trim achieved, I swam some 50m, though we mainly focused not on distance, but on technique of finning, arms usage and horizontal trim.
The final exercise in the pool was about diving safety. We went over the procedure to surface an unconscious diver, and get her back to her senses.
Freediving, as it turns out, is a way to put the world around on pause for a moment. You exist in the here and now, as if the past and future do not exist. The mind is in a completely calm state, while your body floats in a world of weightless balance. As much as diving is a physical activity, it can be a way to enter a state of Zen in the under water world.
Jeanine has not only been a kind, patient and reassuring mentor to me, but opened the door to a world which has always fascinated and intrigued me. A huge, warm thanks for so much inspiration of this deep passion!
The Ocean Warrior, the newest vessel in Sea Shepherd‘s fleet docked in Amsterdam before beginning its voyage to the Southern Ocean around Antarctica to prevent poachers from killing whales. Sea Shepherd is a marine conservation society that employs direct action to protect marine wildlife. The Ocean Warrior is a 54m custom-built vessel, hosting a crew of 16. It’s very fast, reaching almost 30 knots at top speed. It is powered by 4 3000 horse power engines, and features an open deck at the stern with a hefty water cannon.
The Ocean Warrior is an incredibly slick and strictly functional master-piece of ship engineering. Its solid build makes it a tool suitable for the extreme conditions around Antarctica.
Its unusually high top-speed will give the Sea Shepherd fleet a huge strategic advantage in the vast wideness of the Southern Ocean.