
Modernizing AbiWord code - ingve
https://www.figuiere.net/hub/blog/?2016/04/15/860-modernizing-abiword-code
======
sandyarmstrong
AbiWord is my favorite word processor. It was so much less bloated than any
other graphical option. I wrote pretty much all of my papers in college with
it. It reminded me of my previous favorite from my youth: Claris Word.

Glad to see it's still alive. Updating to C++11 should make it a lot more
appealing for new contributors.

~~~
derefr
I used AbiWord years ago, and do recall it being pretty lean.

I get sort of the same _feeling_ , these days, from Apple's Pages, though I'm
not sure whether that's true. (Looking at the copy of it I have sitting
around, the application bundle is 418MB, with 344MB of that being taken up by
the Resources (icons, UI elements, translation strings) and SharedSupport
(themes, templates) folders, leaving the app itself sitting at ~75MB. Not
_too_ bad, I suppose.)

One thing I think more people should consider, though, is how much of what
they use a word processor for that could really just be accomplished using a
_rich text editor_ such as WordPad or TextEdit. Now _those_ are light
programs!

(And honestly, limiting yourself to unstructured rich text for the
_composition_ stage of a document is probably for the best. It keeps you on
task, for one thing. But beyond that, anyone who has only used word-processors
is missing out on the extremely _natural_ workflow of separately doing your
composition (in a rich text editor) and your document layout (in a desktop
publishing program, like Publisher or InDesign) and then taking the finalized
rich text and _linking_ it to a text-region-chain on the layout document. It's
so much easier to make your document look good when your text isn't changing
any more.

~~~
ciconia
Apple Pages is a toy. It's missing some pretty basic features like even/odd
page margins, and becomes annoyingly slow once you do stuff like tables inside
multiple columns. I recently prepared a pretty complex but not very long
document using it and the experience was pretty unpleasant.

~~~
drivingmenuts
I wish they'd open source Pages, Numbers and Keynote. They really are decent
programs that deserve better than Apple abandoning them.

Of course, Word 5 is still the gold standard, as far as I'm concerned. :)

~~~
emdd
Yep! Considering Keynote is the best presentation tool-- but it just sits
there. I'd kill for the iWork platform to go open source.

------
awill
I really loved AbiWord in the early 2000s. However, the fact that they refused
to default to ODF meant I switched away. Who's going to store important
documents in a format that only AbiWord can read. Still though, it's got many
advantages over the LibreOffice bloat.

~~~
oever
Very nice to see activity on Abiword. The enthusiasm of the author is evident.

Abiword does have support for ODF, but it could be better. Abiword 3 uses ODF
1.1. At the last ODF plugfest quite some issues were found [1, end of page].

There are now automatic tests than can be run to improve ODF support. The
tests can be run from the command-line and give output as HTML [2].

Currently, there is a project underway that makes it possible to run the tests
on a public test server which will show live results.

hub asks for tests in his blog post. For loading, saving and rending ODF
files, the ODF community can help.

[1]
[http://odfplugfest.org/2015-thehague/report.html](http://odfplugfest.org/2015-thehague/report.html)
[2]
[http://autotests.opendocumentformat.org/](http://autotests.opendocumentformat.org/)

~~~
hub_
There is definitely lots of improvement to do in that area for AbiWord.

There is a long list of bugs from every side.

------
ravenstine
I liked AbiWord. It was very lean and GTK+ friendly. But I always had little
gotchas with the formatting and problems with ODF occurring between word
processors that didn't occur _as often_ when originating from LibreOffice. It
had the clean/snappy interface that LibreOffice should have had, but
definitely not the document feature support it needed.

These days, I'm not sure why anyone would bother trying to revive AbiWord. Not
that I don't have my fair share of software engineering projects that are
specific to my interests, but I personally wouldn't go back to using it or
LibreOffice. If I really need a full-blown word processor, Google Docs does
everything I need, and their Chrome app works for offline use. Most of the
time, I can get away with writing stuff in Markdown. Then again, I'm a
developer so that appeals to me. Microsoft Word online also works well cross-
platform. With either one, you may not get the best multi-format support, but
they're both _very_ dependable IMO. I couldn't depend on AbiWord most of the
time unless I knew the same doc would be opened in another AbiWord instance.

Web-based technology really is, I think, the best way forward in cross-
platform development for things like word processing which are not CPU
intensive. People can and should use whatever tools they want to get the job
done but, if I was to start a new Linux/CP word processor today, I'd be using
Node.js with Babel and make it "Web Native". For some things you'll want C++
but, for me, not this. But best of luck to them for sure.

~~~
oever
Microsoft Office and Google Docs are examples of applications that require
internet access and report information about the user to the software
provider. That provider in turn can share that information with advertisers.
That is a trade-off that not everybody is willing to make.

There are applications like Etherpad, WebODF (supplied with packages like
ownCloud) that make it possible to work from the browser but on a server that
you can choose. Even desktop applications can be used in this way via
LibreOffice Online or open365.io.

------
api
If you think cross platform development is bad now, go back to the late 90s or
early 2000s... this brought back some painful memories. Look at the old
Mozilla C++ guidelines for more cringe-worthy stuff.

~~~
cannam
Cross-platform development _is_ bad now.

I mean yes, I totally agree that the late 90s were really bad for portable C++
development. You couldn't trust the compilers, you had limited faith in the
libraries, rewriting the container classes yourself and falling back on C
idioms were commonplace. Man, we really had no idea who owned which pointer
back then.

But there was a sweet spot around 2006, when with C++ and Qt4 you could reach
every major desktop platform with a single codebase with essentially identical
UIs bar the detailed widget rendering, and you could do it using code that was
still largely acceptable to work with. I did a fair bit of successful work
that way.

Then the iPhone came along, and a platform explosion, incompatible managed-
code platforms, many different input and output devices to support, more
variety in UI design styles, the world of walled gardens and having to
recreate the UI layer again and again for each company's devices. Now that's
settled down a bit, and instead we have the paralysis of choice among piles of
UI/back-end languages and frameworks all with their own tradeoffs.

Still, at least C++ is a nicer language now.

~~~
api
There are _more_ platforms today, but the tools are much better. Maybe it's a
wash.

In terms of platform sprawl I feel like we're back to the 1980s when there was
Apple II, Mac, IBM PC, IBM clones (not always compatible), TRS-80, Commodore
64, etc.

------
samth
Happy to see AbiWord, the first open-source project I was part of, continuing
to do things the right way. The cross-platform approach in AbiWord has always
been committed to quality over convenience, and I'm glad that's continuing.

~~~
hub_
I'm not sure this will go the way one would want. There is nobody to do
Windows and the Mac port has also fallen behind. I'd rather continue the
bootstrapped Qt port in parallel to Gtk and use that.

------
dduarte
I wonder how clang-tidy [1] could help in this task

[1] [http://clang.llvm.org/extra/clang-
tidy/](http://clang.llvm.org/extra/clang-tidy/)

~~~
tfar
It helps okay. I recently used it to slowly and mostly automatically introduce
more and more C++11 across a bigger code base. For example it does a great job
introducing nullptr [0] and an okay job turning classic for loops into range
based for loops [1] where possible.

[0]
[https://github.com/swift/swift/commit/eddd92ed76ae68cb1e2026...](https://github.com/swift/swift/commit/eddd92ed76ae68cb1e202602fd3ebd11b69191a2)
[1]
[https://github.com/swift/swift/commit/3c560e31b0f168da917e8d...](https://github.com/swift/swift/commit/3c560e31b0f168da917e8d566db01fd1cd997d86)

------
moron4hire
This is something I think about a lot. No matter how much time we spend on
software design and doing things "right", in 5 years it's all going to get
thrown out by someone who thinks the codebase needs "modernizing".

It's actually a bit reassuring to me. Things only having a 5 year lifespan
means you shouldn't spend a lot of time worrying about them. Code is meant to
be disposable, and the less we treat it so, the more we hold ourselves back.

~~~
kazinator
If we treat software as permanent, we hold ourselves back from making risky
changes that wreck it.

If we treat software as temporary, we hold ourselves back from worthwhile
improvements that will have enduring value, especially if they are fairly
difficult.

------
chris_wot
Interesting - looks like AbiWord were having similar issues that LibreOffice
were...

------
sp332
Uh, Eyeball Mark II? Where do I get my upgrade...

~~~
ASalazarMX
Probably had laser eye surgery. Doesn't seem like he uses glasses.

~~~
hub_
nope. Never had eye surgery and I have normal vision without glasses.

It was just a nod a reading stuff with a second set of eyes (ie code I didn't
write).

