On typing
I sometimes think about these two images:
Alexander Graham Bell
communication,
on his first telephone:
Creating a workablevoice-quality transmission of sound,in real-timein 1876
that's a very-hard thing to do.
dude's a 10x engineer
reproducing a few letters of text, after a small delay, would have been much, much easier.
there's only 26 letters. just make 26 wires.
But people *love* texting.
People have
- always -
been awkward talking on the phone
Alexander Bell (with respect!) made the same mistake people are making in software, all the time.
market fit? - analytics? - radical candor?

the command line is amazing.
I love everything about it. and there's a reason we still use it.
people love typing.
people love telling their computer what to do.
fast typing may be the most satisfying,
and impressive human behaviour
since sex was invented.
and i mean that.
typing makes you a clever-ass wiz.
everyone knows it.
Typewriters aren't fun.
people began using typewriters in the 1900's, to seem formal, and professional.
typing on a typewriter is work.
they're loud, they jam.
you live in fear of making a mistake.
-especially at the end of a page-
you had to white-out a typo, or start over.
each time you type a letter, it moves the cursor (the 'carriage') over to the right.
... but what happens when you get all the way to the right side?
it beeps.
loudly
it doesn't ca-
re if you're in the mid-
dle of your word.
some writers use typewriters as a writing exercise - because there is no backspace or undo.
they're so self-conscious that they delete everything they write.
which sounds awful.
i mean, they need a therapist, not a typewriter.
in some ways, this invisible stress, and undiagnosed domestic pain, are what define modern working conditions
but anyways,
nobody would bring them home, for fun.
is what i'm saying.
the modern experience started on December 1968:
while the Apollo 8 was on the launch pad →
What's a cursor?
it's funny how we never think about the cursor.
it hasn't been touched by software developers for decades
like how,
1) you can move it in relative direction,
2) or eyeball a position with the mouse.
or that you can't go above your document
- and only down if you fill it? -
that a page will scroll vertically
but not horizontally.
in some ways, a conversation feels like horizontal-scrolling
and the upcoming lines wouldn't distract you?
Also -
that the cursor is always on-screen
and it shifts the viewport if moved offscreen.
but you're still allowed to scroll-away from it?
temporarily?
there are some alternatives to these defaults in high-end writing apps.
here, you can see 'zen mode' in Ulysses:
which forces the cursor to be vertically centered in your screen.
this feature hasn't taken-off.
typewriters implemented monospace fonts
- each letter moved the carriage over the same amount.
so a document is a grid of letters
like a spreadsheet.
but when you add a letter to the top,
it shifts all the other letters over.
for the whole document, sort of?
... unless you pressed the insert key.
it's gone now.

many people don't know
what it even did.
insert toggled an 'overwrite' mode
and would turn-off the automatic shifting.
it sucked and no one liked it.
unlike caps-lock, (which is still around)
each application would have it's own insert-mode state.
i had never considered this stuff until i watched this talk:
the most-appropriate data-structure for cursor & typing is not at all obvious, or well-studied.
this may be why typing latency has been increasing, while computers are doubling in speed.
how would you do it?
apparently you're supposed to use something called
i'd never heard of it, either.
Nathan Sobo wrote a a bit about using splay trees for this in the Atom editor.
but these things are outrageous things to implement.
Here's a great post looking at 'keypress code' of various popular text-editors.
spoiler - they're outrageous.
remember that some programming languages
do not ever concatenate strings
they make a new copy, every time.
..or if you use a simple Array of chars,
... and you type one character over the buffer-size....
it either explodes or re-copies the whole document, again.
the other thing to mention of course is undo
- which is central to the point of using a computer, in the first place -
... and always an afterthought for app developers
... and always an afterthought when implementing a text-buffer algorithm.
worse -remember that even fast programs are at the whim of the operating-system scheduler,
can lock your program at any time,
for some inscrutable background garbage-collector stuff.
typing - we don't do it right.
even though, in some ways,
it's the whole point of a computer.
we should build a CPU, from the POV of making a typing machine.
there are a few noteworthy projects attempting to make a writing-first computer.
because when you're writing your phD, you should be more than 300ms away from a porno.
some electronic typewriters like the Cannon Starwriter:
found a niche before personal-computers.
more recently, FreeWrite make e-ink devices that go for 500 bucks:
devine-lu-linvega apparently works all-morning on a raspberry pi,
running a two-tone linux distro.
i'd like to see a dedicated piece of furniture for typing.
- given that phones/tablets are increasingly 'bed computers'
importantly - a thing to walk-away from, when you're done your work.
Typing is worse, on the internet
each web-browser ships with its own very-poor text-editor.
it's called <textarea/>.
webpages tell you where you're allowed to type, by giving you a recognizable box.
and we've been trained like children to type only here.
i remember discovering that you can view-source any page,
save it to a file,
and change any of the text.
then open it back in a web-browser.
we have a 'graffiti model', instead of a 'read/write web'.
Annotations amusingly,
were one of the only Vannevar Bush ideas that Engelbart didn't implement (in time) for his demo.
another thing is:
default no-focus
of the cursor, on page-load.
in some videogames, you have a always-on keyboard.
you don't need to think about where your cursor is.
you can just type, and the computer picks it up.
i've always felt that the browser should retain the keyboard focus, until the page steals it.
when you load a webpage, there's this dark experience,
where your keyboard, (your main thing!)
is talking to nothing, and completely ignores you.
that's bad.
Typing is better in court
even old keyboards almost always had a shift key.
This avoided the problem of having an uppercase keyboard, and a lowercase keyboard.
Some keyboards would have several shift keys:
'Capital shift' and 'Figure shift'
this allowed adding more characters, like numbers and punctuation.
this was an obvious thing to do,
even in 1890.
engineers call this multiplexing - adding multiple modes to one channel.
50 years later, we have 5 modifier keys,
which are the most-used buttons on a keyboard, by far.
and by any account - are handled in a sloppy, ad-hoc, unconfigurable, and invisible way.
keyboard shortcuts are something we need badly to do better.
One thing that's still impossible today is multi-key shortcuts:
i want to press
to open Spotify.
and
to open firefox.
Devices that support Multi-key shortcuts are called chorded keyboards,
and are used in stenography:
to write the word 'today':
to write the words 'are you':
and you can type faster than people talk.
a chorded keyboard was part of Engelbart's mother-of-all-demos,
and I have no idea why they have not re-appeared in the past 50 years.
it seems like a good idea.
Rich-text:
aka:
what you see is
what you get
in 2011, Mike Bostock created D3.
it's a ubiquitous tool to help people make visualizations on the internet.
the idea is that everyone has:
1) some data,
2) a rendering of it, and
3) a map between these two things.
then they run into problems keeping these two things together
like during a transition, or interaction, or a data-change...
the idea was to keep these things together
so they had clearer relationship.
(and called it 'Data-Driven-Documents')
this is not easy.
d3 (respectfully) doesn't even do it very well.
that's how i think about typing,
there's:
1) the actual characters you typed
2) the rendering, and display
3) and some interpretation / mapping between them
- maybe the only exception would be #hashtags?
really though.
syntax-highlighting is easier, because it's passive -
there's no interaction,
you can't ask something to be a different colour.
in 2003 Mozilla implemented an IE feature called 'design mode',
with the intent of allowing WYSIWYG rich-text editing on the web.
- to do syntax-highlighting in websites -
- to give feedback for typed text -
we know this now as content-editable.
content-editable has become the most heavily-lampooned feature, perhaps ever.
i have 10 projects I want to start, as soon as it works.
i reckon every major software organization has their own attempt at rich-text.
in 2019, none of them work well.
it's one of those things everyone thinks they can do.
here's the Draft.js guy:
you can enjoy his talk, and wish the project well,
and not realize the library (which is facebook funded)
yup.
and that nobody has done this well, ever.
and I can't figure-out
exactly
even what dream-computer would
do typing well.
and this kind of infuriates me.