The "loop and a half"

bartc bc at freeuk.com
Sun Oct 8 12:50:59 EDT 2017


On 08/10/2017 17:13, Chris Angelico wrote:
> On Mon, Oct 9, 2017 at 2:01 AM, bartc <bc at freeuk.com> wrote:
>> However as graphics became more mainstream then yes I did adopt some
>> commonly expected styles (menubars for example). As for Alt-F4, if that
>> generates a WM_CLOSE message for example, then I would be obliged to deal
>> with it.
> 
> Yes, it usually does generate that. Why? Because your desktop manager
> translates concrete user actions into abstract events like "close
> window" - and does so according to a number of standards. In case you
> haven't noticed, those standards are not 100% consistent across
> platforms. So that means that...
> 
> On Sun, Oct 8, 2017 at 10:46 PM, bartc <bc at freeuk.com> wrote:
>> On 07/10/2017 15:40, Steve D'Aprano wrote:
>>> Or you could just follow the expected Unix interface instead of inventing
>>> your own.
>>
>> Your job is to port an editor that people have been using for 30 years to
>> Linux. The first thing you do is to change all the commands and shortcuts to
>> match what is typical on Linux? So that no-one who was familiar with it as
>> it was can actually use it?
> 
> ... yeah, you absolutely *should* follow your OS's conventions, and
> you automatically *will* if you're using a properly-designed GUI
> toolkit. Why should it be different with the console? For instance,
> anyone on Linux will understand what this prompt notation means:
> 
> Use config file: [~/.flurblerc]
> 
> Yep, definitely follow your host platform's conventions.

Yeah, well, some people like to be sheep, others like to be individuals**.

I start in computing at a time when an application was the only thing 
running on a computer, at least, when people had personal computers of 
their own. Then it really didn't matter what went on outside, as nothing 
did.

(That approach seems to have become popular again with tablets and 
things usually having one application occupying the screen at a time.)

And within an application, it can do what it likes. With regards to 
editing, there are some common conventions that I absolutely hate:

* Left and right keys, and backspace and delete keys, that don't regard 
the left and right ends of a line as hard stops; they just keep going. 
OK-ish for word processing, but not for line-oriented code.

* Clicking on a box containing text and the whole thing being 
highlighted. Now you're on tenterhooks as the slightest move and 
everything disappears. You might be able able to press Ctrl Z to get it 
back (yes, the same Ctrl Z that's supposed to terminate applications!) 
but it's still highlighted.

* Clicking backspace on a web page doing the same as the Back button. 
Now, backspace is used for editing text within forms. It's very annoying 
if, after half an hour filling in a form, somehow the current box loses 
the focus (the cursor), but you proceed to press backspace space several 
time before noticing. Like my first complaint, but in spades.

* Under Windows, if you press Shift while Caps Lock is on, you get lower 
case letters. I've never, ever wanted to do this (probably no one else 
has). My own editor doesn't obey that convention: shift-A will always 
come out as 'A' whatever the caps lock setting.

There are dozens more, yet you are surprised why sometimes I prefer 
doing things my own way? There are good reasons!

(**I was in the audience of a Michael Palin interview a couple of weeks 
back. (You know, an actual Python!) Before he came on the audience was 
programmed to respond to the word 'individuals' by all saying 'Yes, we 
are all individuals!'. Apart from me, obviously.)

-- 
bartc



More information about the Python-list mailing list