Okay! I have a proper blog engine, I have finally found an absolutely fantastic screenshot tool for Windows, so I guess it’s time for me to ramble on geeky topics.
Like, for instance, shit that LibreOffice still hasn’t fixed.
I’ll ramble about two particular things.
I know LibreOffice has a troubled history. It used to be OpenOffice.org, which was a project that was plagued by bureaucracy. It was old, overly complex codebase that got bought by Sun from a company called StarDivision. Sun cleared it up and it became just as complex. With a gigantic program that size, bureaucracy was inevitable. So later, people got fed up with it and decided to split it up to LibreOffice, which is again trying to operate by good open source practices.
Yet, unfortunately, LibreOffice developers aren’t making feedback easier to give. Document Foundation website does give us pointers for mailing lists, but really, mailing lists are so 1980s. It took quite a bit of clicking to even find out that they have a bug tracker.
That particular Bugzilla does have “enhancement” bug severity rating (like all Bugzillas ever), so I assume it’s also used for feature requests to some capacity. I didn’t quite have the patience to do advanced Bugzilla queries to actually verify that, and the same, I assume, would apply to all members of the general public. In general, for all open source projects, I’d like to see an easier way to submit and view pending suggestions from the general public. Bugzilla is good for keeping track of those pieces of information and allowing the developers to respond to them, but it’s also terrible for non-technical people. (To TDF’s credit, they’re at least providing a simplified bug submission form.)
So here’s my two big beefs.
Document language setting
I write documents in two – no wait, three languages. English (British and American) and Finnish.
What’s the first thing I do when I start writing a new document, to avoid the spellchecker going crazy? Set the document language. It defaults to Finnish, but I’m writing plenty of stuff in English.
|How do you change the document language? It’s not in “Formatting” or “Edit”, that would be too logical. It’s in “Tools||Language||For the whole text”.|
Of course, as you can see, in this particular case, when I haven’t yet chosen any language, it shows me only one language choice. The language the document is already in, incidentally. Sometimes, it shows me the language the document is already in, and Bulgarian or something. The point is, this quick choice menu is never useful when starting a new document.
Except just when I was writing this, I randomly got this:
Yep. Now that I’ve set the language of this document to British English, it suddenly gives me the offer of all languages I’ve always used. Right after I’ve already chosen the language for this document and I never need to touch this menu again. It knows what I’ve done, and it’s just mocking me.
Except I just tried it again and now it only shows me British English and Finnish. There’s no logic to this help me help me help.
So, if I want to choose a language and pick “More…”, I somehow end up in…
…the LibreOffice settings.
The settings dialog for the entire bloody application.
In this dialog you’re supposed to pick the default languages for the documents. Incidentally, the same dialog is also used to choose language for this particular document.
And, of course, this particular language choice is clear as mud. You choose a “Western” language. And I suppose it’s somehow possible to choose Asian languages. I have no idea what the widgets really represent here. I suppose it’s meant to be the choice of language and special settings for Asian scripts. I have no idea.
The checkbox at the bottom is used to magically transform this dialog from settings dialog for the whole application to a settings dialog for this particular document.
And, of course, in the language choice list, guess what you’ll get?
A gigantic list of languages, of course, what else! You need to wade through the list every time you choose the language, because goodness forbid if it should in any way remember what choices you made in the past!
And the funniest part of the list is that Finnish shows up twice. As “Default – Finnish” and “Finnish”. Because there’s probably some highly significant difference between the language as a default and not as a default. I’m just not getting it.
And of course, the sorting is atrocious.
The choices for, say, “English (Australian)”, “English (Canadian)” and “English (South African)” are nicely sorted into a same group, because they all start with “English”. Then I get “American English” and “British English”, which are sorted into A and B respectively, because these languages are somehow special, I suppose.
So here’s my design suggestions:
Maybe move the Language choice to some menu where it makes sense, like Formatting.
Allow people to choose languages that appear in the menus and make them “sticky”.
Make a separate dialogue for “current document” language and the application default languages. This design is a total hack and not very intuitive.
Insist that language names are consistent (I don’t know if this applies just to the Finnish localisation), and sorted the same way. You could, say, display the ISO codes too.
And the sad part is, this is the design that has been there since the dawn, and no one has bothered to fix it! You’d expect a lot more complaining about it.
The scripting interface is terrible
I was happy to note that LibreOffice has changed one feature that was in OpenOffice.org. The macro recorder.
They’ve disabled the macro recorder by default, and labelled it as “experimental”.
Yeah. Good that they’re coming clean about it.
I’m very happy to see applications with beautiful scripting interfaces. I’m particularly partial to Emacs, which has always had really cool and really intuitive scripting interface.
In Emacs, you’re just issuing commands like “Search forward for ‘blah’” and “go to the beginning of the line” and then “delete this particular line”. You’re just listing the same commands you’re doing when you’d actually edit the document by hand. I call it “cursor choreography”.
So what does LibreOffice do?
And what’s the programming paradigm for StarBasic?
I’ll give you a free hint: the macro above does not bloody work.
Since changing document language is such an absolute bastard of an operation, I wanted a macro to do that. The macro above is basically what the macro recorder spat out. Looked up online, and people were using similar things for other languages.
Guess what – it doesn’t work.
The macro recorder actually spits out two identical macros if I make one that chooses British English and one that chooses American English.
And if I look at the code, I fucking don’t see the “cursor choreography” paradigm.
Instead, I see this:
The script has to explicitly find a reference to the “current document”.
The script has to start up something called a “dispatch helper”. Because it’d make too much sense to issue editing commands directly.
To execute commands, you need to send the commands through the dispatcher in question. Of course, it can never just accept any arbitrary arguments. They have to be packaged manually in a property container, which has to be created manually too.
To actually perform command, it’d make too much sense to just invoke the method by name. Instead, you’re telling the dispatcher that you want to invoke a method by specific name and send it the packaged garbage as parameters.
SOMEONE PLEASE KILL ME NOW.
Let’s put forth a hypothesis. If Emacs could edit OpenDocument files, guess what this exact command would look like, according to Emacs design philosophy?
No fucking around with indirect call dispatcher thingymabobbery. No contrived manual instantamaticutations and packagunatunations of parameto-sandwiches. Commands already fucking know what document they’re manipulating. If a command happens to needs multiple parameters (multiple as in “more than zero”), JUST DO EEEEETTTT.
And especially there would be no fucking guessing what the parameters are. I never figured out what I’m supposed to give as a language code. It seems to be spelled out in English, instead of having something logical and internationally understood, like, oh, ISO language code.
Most importantly, there’s no fucking documentation for this shit, or it’s incomplete. Hell, I’m not sure if interactive documentation could be built for a monstrously complicated thing like this.
Emacs, by comparison, has interactive documentation for every-fucking-thing. “M-x describe-function” and off ye go!
(Oh, and in Emacs, you obviously wouldn’t need to do this in a bloody macro. You’d just hit “M-x set-buffer-opendocument-language ENTER en-GB ENTER”. Emacs was built before menus were even invented, so you obviously don’t need to fuck around with menus either!)
I would love to do some document manipulation in LibreOffice itself, but the macro language is just wayyyyy too contrived and complicated. That, coupled with the fact that LibreOffice has finally admitted that the macro recorder is terrible and needs to be fixed, is not helping things.