Friday, 19 September 2014

Don't cross the streams

One of the rudest things any program can do is to unpredictably jam its output stream into the operator's input stream.  It sounds like such a basic and obvious no-no, but it is astonishing how many pieces of software fail this basic etiquitte test.  'Stealing focus' is just the most common example, but in general anything that breaks your flow is a candidate.  The machine should only alter your behavior in cases where something critical depends on it, and so the fault here is that whoever designed the program has an inaccurate sense of what's actually important to you, and when it's important.

This is one argument for radically reconfigurable computing systems, but leaving that aside I often cannot fathom what thought process somebody went through to decide that it was worth interrupting my flow for something.  Or maybe they just didn't test the damned thing enough -- programmers should always have to eat their own cooking every day for a month before they even think about releasing it on an unsuspecting public.

The point is that output alters the user's behavior, and you only want to do that if the user is currently behaving inappropriately.  Superfluous output is wasted cycles on both the machine and user side, and the further sin of shoving that output directly in the user's active input stream is shitting where you eat.

(Addendum: A more insidious version of this is anything that assumes you want information dumped in your face, rather than waiting for you to tell it so.  This is why google.com is a nice interface while facebook.com is a rude one.  Also why all phones should come with a person-by-person ring setting, i.e. I want my phone to ring when my sister calls but not when my creditors call.)

Friday, 12 September 2014

Beauty and the Beast

I'm not the first to gripe about this, but one more voice in the chorus never hurts: it is an absolutely insane state of affairs that the conventional environment for something as nice and relatively ageless as Common Lisp is something as hoary and archaic as Emacs.  Forcing somebody to get used to the arcane and arbitrary keybindings in Emacs before they can enjoy Lisp is like making them learn to type with their toes in order to use a laptop.  It's utterly senseless, and I'm pretty sure the only reason it is this way is that once you've invested the months it takes to feel at home in Emacs, you have no incentive to create a more natural environment.

I'm currently playing around with Sublime Text with the SublimeREPL add-on, modded out to run CLISP.  As an environment it's cloying in its own way -- no, ST, I don't actually want you to insert that close-paren or quote mark for me, thanks anyway you interfering smartarse -- but the fact that I don't have to get a repetitive stress injury in my pinky or remember entirely un-mnemonic commands is a major plus.  Lack of a simple, standardized, intuitive environment that just works (like Racket has) makes CL substantially less 'approachable' -- Emacs-hate was precisely the reason I didn't bother diving deep into CL years ago, and if a more accessable environment had existed back then I might be a CL guru by now.

Sadly, this is indicative of the mindset of the CL community, which has a very 'eat your fucking vegetables' attitude -- not necessarily a bad thing, but certainly an impediment to widespread Lisp dominance.  You can have your elitism and complain about how brain-dead the rest of the world is, or you can work to enlighten the commoners and fill the world with beautiful things -- pick one.