(2023-05-22) Kartik Using Computers More Freely And Safely

Kartik Agaram: Using computers more freely and safely. How can we use computers more freely and safely? The punchline...

Prefer software:
with thousands rather than millions of users
that seldom requires updates
that spawns lots of forks
that is easy to modify
that you can modify

The most important step is the first one. Humanity didn't get good at building houses by building the same house a million times. We built lots of different houses and learned from each other's failures. Gravitating away from monopolies is a way everyone can help improve software, regardless of our abilities or needs. (diversity)

So, problems. The first problem is: software is expensive

Also, software today is just not very trustworthy

Data breaches impact millions of people every year.

Beyond incompetence, services engage in rampant misbehavior. This is a headline from a couple of years ago. Just about every single major phone app was snooping on your clipboard

But maybe that's just websites that have to go out over the internet. What about native apps? Here is a study showing that a computer from 2015 is 2-5 times slower than an Apple 2e from 1986 just at reading a keystroke and displaying it on screen.

What do we do about it?

My first resolution is just to bring less software into my life

Computers have already eaten the world. Today I need to use computers to conduct commerce, interact with my government, and to talk to my family and friends. What to do about this?

One coping mechanism is an idea from almost 20 years ago called situated software. This is software with a few users who know each other and share a social context or situation

However, I think we don't yet appreciate the implications of this idea at all levels of activity around computers.

As a programmer, I've tried multiple times in the past decade to create services just for myself and a few friends. Each of them has fallen away after a year or two. And a big reason for that was the burden of keeping up with updates for all the tools they depend on.

I was using tools that themselves are catering to non-situated software. They assume that it's worth someone's time to keep up with updates every month or two

Last year I switched to something new. This is the Lua programming language

It's not as popular as Javascript or Python. As a result, it doesn't tend to get used in products of conquest that try to be all things to all people.

Another thing I love about it: there's a widespread culture of using old versions. Lua is often embedded in games.

This is the LÖVE (Love2D) game engine. It's based on Lua, it's easy to build, it changes infrequently, and it's surprisingly versatile while providing a tiny set of APIs.

LÖVE allows me to send a zip file with inspectable source code to my friends. All they need to run it is a single, reputable 5MB binary.

The app that started it all was a plain-text editor that lets me draw little line drawings in the middle of text. I find it very useful. (2022-06-04 KartikPlainTextWithLines)

When I show it to other programmers, often the first question I get is about what the file format for drawings is, and how to get other editors to support that file format. But does it make sense to so privilege interoperability?

This is an example of keeping requirements negotiable. We programmers have a tendency to start with a germ of a neat idea and, in a microsecond, often so fast we're not even conscious of the transition, pile on a bunch of requirements to it, just because other things like it satisfy those requirements

it's worth coming up with strategies to question assumptions. One hack I've found useful is to stop trying to seem “professional”.

In practice, seeming professional is often a way to end up with a pile of stuff you don't need. All it does is slow you down.

One particularly egregious requirement we unthinkingly take on is backwards compatibility.

We programmers have long had an ideal of building programs that do one thing and do it well. But we have a really hard time keeping such programs from accreting features and complexity over time. I think one essential requirement for programs that do a single thing well is to not tie yourself too tightly with what other people want. It's easy for two people to want slightly different things, and a program that tries to cover both is no longer doing one thing.

if others want to do something slightly different, well we already have a solution: fork!

Our conventional UI idioms were created in the context of organizations. Menus and toolbars are at least partly scalable ways to pack lots of features in, to be all things to all people. Situated software doesn't need menus and toolbars.

To modify any of my LÖVE apps you need just a second LÖVE app. Run the same 5MB LÖVE binary, just on a different 5k lines of Lua, mostly the same as my editor, just tweaked in a few ways, and now you can make changes to any of my apps as they run, without having to restart them

Teaching a new LÖVE app to listen for commands from the editor takes 250 LoC.

My editing environment doesn't have find-and-replace yet. I haven't felt much need for it

I've surprised myself a couple of times when a seemingly complex program turns out to have a simple core. This is a simple DOM model I wrote in 50 lines of code. It doesn't support 99.9% of CSS. It's just a simple way to specify grid layouts. Throw in an infinite 2D surface (infinite canvas) with support for panning and zooming, and it requires 350 LoC.

I found myself gravitating towards a style where I positioned definitions once and never moved them thereafter. It was valuable to give all the code for my apps a place, so I always have a sense of space when I make changes to it. The computer contains my memory palace.

My initial plan had been to create clones of apps for myself and take out lots of features. It felt like eating my vegetables. I didn't expect to find myself wondering what a web browser for memory palaces might look like. Small apps leave more headroom for design exploration

The final message I want to leave you with is: avoid crowds. We can each have huge quantities of freedom inside our own devices on this crowded planet.


Edited:    |       |    Search Twitter for discussion