June 8, 2021

My Linux App Summit (LAS) presentation

The story of a new developer finding her way into the Linux app ecosystem that explores why and how we should write more apps for arm.

The linux app summit is a global event to learn, collaborate, and talk about the Linux application ecosystem. I was lucky enough to have my presentation accepted onto the LAS 2021 slate. I knew going in that I would be one of the least savvy people in the room. But being new and not being super technical didn’t stop me, I had something to say, so I said it. My strength lies in spinning a decent story, so I lent into the skid and put on the show. What follows is the story I told.

Once upon a time, in a hole in the ground, in a cupboard under the stairs, in a galaxy far far away, on GitHub, we can imagine a developer. Maybe she has a job, maybe she doesn’t, maybe she works for a tech company, maybe she works in a corner shop, it doesn’t matter, but she’s just getting started in app development.

She spends one evening surfing the web, scrolling through projects, looking at open source repos, looking for something to contribute to, and she has an idea, she wants to build an app. For the sake of the story it doesn’t matter what app, any app, for now lets say its a command line tool that maybe tracks the stocks that she’s invested in? We’ll call it Stonker.  

She does this in her free time, after work,  on the weekends, she really wants to build something of it, help people track their stonks, maybe she wants to roadmap some work to add a feature to eventually crawl Reddit for the next opportunity to stick it to the man? Maybe even build a community around her app! But that’s down the road, her first problem is where to start.

I’m sure we’ve all been there, you have an idea, maybe a project, maybe something you want to contribute to and you go hunting for where to start, where to begin, how to begin. Well what would she find?

She’s not going to find anything about building apps for Linux. If she knew she was interested in Linux maybe she’d have added Linux to the search but maybe she wouldn’t. If she went off her first search she’d end up down the mobile app rabbit hole and would have found her way to iOS or Android, long before she would have thought about Linux.

> Side note: It seems like any bloggers out there have a nice SEO target here.  Even when I searched Desktop specifically it was all windows documentation! WINDOWS DOCS, those docs aren’t even very good. If we want first timers to go down the Linux rabbit hole, let's start targeting blogs at specific keywords to build google juice of sites about Linux apps. Sites like https://makealinux.app/. If you’re writing Linux app blogs or creating linux app content and would like a hand optimising for google juice, let me know.

This story is about Linux Apps, so let's move past this, let's say she finds her way to open source. Maybe to Linux, but more importantly she finds her way to open source communities. Somewhere she can do her work in the open and if she runs into issues there are active forums for questions and users for contributions. She hasn’t got time for courses, she just wants to get stuck in! So she looks for tutorials, documentation and YouTube videos. She reads through the documentation, watches YouTube videos, gets inspired, there’s lots of interesting things going on but in her search she’s looking for something new, something exciting, something that she can get ahead of and really try something. Then she sees certain developers she follows raving about, the M1? Well, more specifically she finds the Apple macbook Air with an M1 chip.

Ooooo, the new shiny, interesting. It’s performant, she’s heard of Apple, but it is expensive, it has an arm processor … hello? That’s interesting, she realises, wait, that would have to be a whole new class of application. Built specifically for arm hardware! So she searches, ‘what’s up with arm?’  

… nope nope, okay let’s try arm silicon

And all she finds is Apple. Damn. Well, for the sake of brevity, she finds herself on the NVIDIA news. She goes looking for more arm specific content and perhaps the fabled algorithm throws up a news article. Now of course she’s heard of Nvidia right? Who hasn’t? Yea, she knows they do crazy GPU stuff and she reads ‘Nvidia acquiring arm’.

This could be serious. Wait wait wait, she realises the implications of this. Even if we just zoom in on Linux and desktop applications. If folks like Apple are already moving toward desktop class arm hardware, you can bet your bottom dollar other hardware vendors are working on it too. Equally, you can bet Nvidia noticed. With arm, a company who partners with just about everyone, Microsoft, Intel, Qualcomm, Apple, Amazon, IBM, Nintendo, on embedded devices, getting leveled up by Nvidia and its GPU, server, supercomputer stacks, you can be sure embedded devices will get smarter, and workstation vendors will be able to leverage the technology. That means Linux will be coming to more ‘embedded devices' and arm desktops are on their way. What’s missing? Where’s the opportunity? As ever, apps. Building new or adapting old apps for arm is going to become crucial. She recognises this.

So she thinks, okay what else is arm? She discovers arm is typically for the embedded spac, phones, fridges, tablets, IoT devices, all very buzzwordy, but where’s the innovation right now. Cloud? Amazon Graviton 2? Edge compute, clustering, blah blah. Okay so she’s convinced there’s a future. She decides to dig in.

She wants to start developing for arm which, it is fair to say it still non-typical, so she can get ahead of the curve, break new ground, maybe turn it into a mobile/embedded app later but start with the Desktop. On the face of it, it looks hard. There’s not a lot of tutorials or examples at the moment, and what exists is Apple-centric. Maybe there are paid-for-courses but that’s no good, then it becomes expensive, and you very quickly find articles telling you that you need an arm device to build arm on. Does that mean she has to buy the M1 to develop desktop apps? Does that mean you have to build in the cloud? Is there no way to build for arm on another architecture?

She thinks, okay, this is a lot, let’s start at the bottom. Arm is a company, maybe they have a place to start. Ah, okay good, they do.

Forums and docs. Perfect. Scroll scroll scroll. But she finds its all just a lot about embedded stuff, not apps. No need to panic, okay, there’s a Linux section. But, that’s not super helpful either. But she realises apps are a couple of layers up, with Linux. So she goes looking for Linux arm apps docs. The first thing she finds is:

A Reddit thread talking about Ubuntu and later there’s a thread on raspberry pi dot org. So she thinks to herself, “Arm, Ubuntu, Raspberry Pi, can I do this?”

Can she do this? Can she get ahead of the curve, write applications for arm that will run on graviton and the M1? Apps that cater for the incoming arm based future. Maybe get ahead of the arm apps ecosystem? Maybe she make arm the first class citizen for her app but build up and around on other architectures. Maybe even write tutorials and documentation and become an influencer in the space? It's safe to say pretty soon arm based hardware won’t cost an ARM and a leg, Nvidia may well bring it to every developer on the planet. Can she do this?

Spoiler alert, yes. It’s time for her to make some decisions.

She opens docs in tabs that she’ll likely never close. Arm, Ubuntu, links to snapcraft and launchpad, Github, Raspberry Pi, okay. Next she gets herself into the forums and over on the YouTubes, she spots this budding ‘Arm Software Developers’ Channel . Onto Ubuntu. She finds Ubuntu is nice and free, there are Ubuntu images for Arm, that's good for if we want to start developing natively, she pops into the Ubuntu discourse to see what’s going on. She sees she can very easily raise her ideas and talk about what she wants to do and how she wants to contribute. Great. Okay, that’s Architecture and Linux taken care of. Onto Raspberry Pi support for when she wants to do testing, and there’s a community of developers around her there too.

So she can get started developing. We’ll say she used Flutter. Lets say she wrote it on her Ubuntu workstation and she used VScodium. Note, that’s codium, not vscode. And she gets it on GitHub. It’s an open source project, because of course it is, and maybe it has one or two other contributors who helped her out in the forums while she was developing. Great. But really, isn’t that the fun part, the bulk of the work done? Oh dear, she thinks, deploying apps on Linux, is she going to start thinking about packaging now? Okay okay, she holds her breath and dives in. But no! The helpful commentary gets less responsive, Linux Apps are great, Linux packaging is, well, less great.

She finds a lot of debate about how to package her software, a lot of toxicity, a lot of options. Huph, why can’t she just compile a Linux binary? Hahaha. Yea. Right. Oooo maybe we can get it in the kernel? Hahahahaha, no, that’s a silly idea, we’ve all seen Linus talk about that. So we run into a hurdle. We want to build this thing for Linux, because obviously, and we want it built for arm.

Oh no. She starts to flounder. Paralysed by choice. Rpm? Flatpack? Appimage? Snap? Deb? Blah blah blah. She reads up, she finds some pretty good documentation for each format, communities of definitely passionate people around each one, but the days are ticking by. She doesn’t want to pick one and then regret it. She’s an app developer, not a software packager.

Side note: We have a lot of baggage in the Linux app ecosystem when it comes to packaging. What we need is objective measurements of what packaging is best for what uses cases and then work on wider support. I touch on this again later, but if representatives of packaging formats want to talk, the Ubuntu community team (that I’m a part of) would love to join the discussion.

Enter, one of you. She drops her concern in a forum. It doesn’t matter where. And low and behold a trusted advisor, a community leader, responds.

“Hey, software packaging and distribution on Linux is a bit of a mess. Don’t worry though, options can be good, and they’re all good for different reasons. Just remember, how you package the app doesn’t really matter. Its the app that matters, and thanks for writing it for Linux. So what are your goals? What’s your use case and we’ll see what packaging is right for you.”

Blink blink. Thank you anonymous community leader.

So the packaging has to have arm support. She wants it to become a thing and keep developing so she wants an easy way to update it, and of course security is important too, she guesses. So this community leader recommends snaps. But let me reiterate, the packaging is less important than the app.

She gets into the docs. There is lots of documentation around snapping an app, snapping a flutter app, and some nice articles by some first timers. She learns that snapping an app for arm is not only possible but is already being done. So she writes her .yaml file, this is effectively the snap itself. It packages her code and dependencies to keep the application content isolated and immutable with a writable area separated from the rest of the system.

She builds it remotely. This is a snapcraft feature that lets you build on someone elses computer. Super nifty and easy if you want to actually do things with your computer while things build so it doesn't take up all the resources. Her build works, it spits out numerous images, including an amd64 and an arm image. She tries it on her laptop, it works. But that’s not what she cares about. She cares about arm

So she fires up Ubuntu on her Raspberry Pi 400 and it works there too. I.e she can get herself some accessible arm hardware, confident because of the two communities around Ubuntu on Raspberry Pi, that it will work and she’ll be able to at least test things out if not develop natively.  

She kicks those tyres, she makes sure everything she wants the app to do works. Maybe she even gets in touch with me or my colleagues to talk about testing, we’ve run testing days in recent history for Ubuntu images, there’s no reason she couldn’t, if she wanted to, start an app testers thread or group and crack on with some sweet sweet application testing.

She goes the the snap store and reserves the name Stonker, she builds for every architecture, she sends them to the global snapstore, she hooks it up to her GitHub repo such that every time she pushes to her GitHub repo it triggers a new build that is pushed to the store, and …. good.

Sigh. She Sits back. ….

She sits back up.

She makes her snap landing page look nice. Writes a blog post about her experience and links to it.

Then she pops up in the snapcraft forum about what she’s done. I see it. Me. I put it up on the featured section of the snap store, it goes up a few hundred users and … hold the phone.

Is that it? Right? Lets check, she has her app, it’s open source, and it’s hosted on GitHub, nice. There’s a couple contributors but she can always call some more, she’s in the right forums, GitHub is hooked up to Snapcraft so we can keep our app up-to-date. We can trigger builds for all of the architectures we’ll ever really want. And each time we do we can install the snap on our Raspberry Pi and kick the tyres. Huh. Did she just arm herself with a Linux app? Did she just contribute an app to the Linux ecosystem that is going to be able to run on the Nvidia arm developer hardware of the future? She did. Tada.

Now, if you’ve gone through the process of building your app already, and it already exists you really didn't need to read all of that. But if you have similar goals to our protagonist; updatability, cross distro support, and arm support for the new world on the horizon, you should check out snaps too.

Give yourself a hand, and an arm, support for applications is going to be crucial for reaching users, both old and new. Build for arm. ARM yourself.

Summary

Despite events like LAS and the work everyone there does, apps on Linux are lacking visibility …

Next time you write an article, or a blog, or a tutorial, or even do a video about app development, I encourage you to take a moment to think about how the newest of developers would find it? What route would you take to find your content? Then think about what route a new user might take? Then look at those routes and make them more accessible. We all can and we all should. This doesn’t necessarily mean SEO like I have mentioned already but it means signposting where the ‘getting started’ material is. How can we expect people to join our Linux Application Community Highway if they can’t even find the on ramp, never mind get up to speed

Software packaging brings with it a lot of baggage …

I spent all of three weeks as a snap advocate before I was moved to the Community team within Canonical. This was not because of snaps but internal reasons. In that time I snapped some things, I wrote about snapping, I learnt about Linux applications and I learnt about packaging. Now while the technology is great, really interesting, and super useful, the drama is paralysing. There are some wonderful people in the community who are incredibly constructive and helpful and who get it. And there are people who talk about packaging software like its an extremist branch of a religion. Now far be it from me to wade into those waters, but for the sake of the Linux App Ecosystem, we need to find a better way to deal with this. If you have ideas, let me know, we’ll start the movement.  

We have a unique opportunity with the coming of more Linux compatible mainstream arm hardware to solve both of these issues and get ahead of the game …

As a brit I’ve been following the acquisition of arm with a keen eye. The pros and cons are of course enormous, and one way or the other there’s going to be a lasting impact on arm and the general hardware landscape out there. If it goes ahead, in theory, possibly, just possibly, there is a huge opportunity here to re-group and kick Linux apps into a higher gear. Heck there’s lots of possibility but if we use this opportunity to get some semblance of coherency, give Linux applications common ground and get them out there ahead of the pack, people, new developers, old developers might take notice. Heck, I know folks from Nvidia and Arm will see this, they’d take notice, but its up to developers, folks like you to make it happen. Again, if you have ideas, I’d like to hear them, we’ll start the movement.