Saturday, May 31, 2008

Updates

So, as May draws to a close, I have some updates on my mozilla work. First off is the pain I have been enduring as I work on listarchive. As of right now, I can create an account through the account wizard, and have it show up in the folder list without anything blowing up (which is not trivial). It turns out that the lack of the folder being initialized through RDF was that I retrieved it from a direct create instance instead of retrieving it from the RDF service. With a few more functions, I could probably avoid the RDF service, but until jminta finishes his war on RDF, it's just as well to use RDF and have things work magically. Of course, listarchive still requires some modification of sources to work, and don't even think about asking me to port it to Thunderbird 2, it's bad enough on trunk!

In addition, I have put some quality time in with my documentation of creating new account types. A lot more exists in my local work than exists on said page in part because I want to have working prototypes before committing to a guide, and in part because I need to make sure I'm not relying on deep-level unreliable code before posting.

Part 3 of work concerns documentation. If you rely heavily on mxr, you may have noticed that over the past week or so, some idl files got some nifty diagrams. These diagrams are created by doxygen (db48x is so nicely hosting them). You can generate these diagrams and doxygen documentation by typing make documentation from the root makefile. It is helpful to include this update to mozilla, and this update to doxygen. The mozilla update squelches some problems and changes some options to make documentation look better. The doxygen update makes doxygen like mozilla's IDL files better. If you want more tips on documentation, this site is a good starting place. (Writing some mozilla documentation guides is creeping up on my todo list as well).

Various other small things: I've been working on the address book rewrite some more. I have some updates to fakeserver related to writing some tests for old news subscription bugs, and to fix some bugs in code that was never tested. Updating morkreader, doing some pref analyses of de-mork of panacea.dat. I've even found time to start maintaining an account manager rewrite proposal.

Break time's over, here weI go!

Sunday, May 11, 2008

Visual Studio and Mozilla

Visual Studio and Mozilla, sitting in a tree, K-I-S-S-I-N-G… Okay, maybe they're not kissing, but I'm getting them to like each other a whole lot more. I have a quick-and-dirty script that creates the filter list for the .vcproj from the mozilla directory. It appears, however, that mozilla has something on the order of 23000 .cpp, .c, .idl, and .h files, which makes loading the class viewer a bit slow. It also takes quite a bit of time to load the project in the first place.

Right now, my script only loads .cpp, .c, .idl, and .h files into the project, and does so dumbly. Version 1.0 will probably read the Makefile.in files to determine which directories we shouldn't look into, based on a simple heuristic of GNU_CXX being undefined, and OS_ARCH equalling WINNT; I may make some broad-based assumptions about platforms as well (don't include MOZ_THUNDERBIRD unless we're thunderbird, e.g.). It will also prune "empty" directories; in this regard, perhaps generating the folder tree from the output would be easier.

Still to do is to set up options such that clicking "Build" or "Debug" does The Right Thing™. I'd also like to investigate some performance problems, but that's a long ways away. Eventually, I'd like to hook up the project file to a customized add-in that adds mercurial checkout support and adds/removes the files as happens in the hg repo (but it won't run those commands: I'm assuming people are using shared-source trees here).

Announcing Start of Listarchive!

Last night, I started work on the first of my triad of extensions detailed in this earlier post, listarchive. So I can't come up with a good name. The most up-to-date information will be available at this web page, but I will summarize some key points here.

listarchive is an extension that first and foremost aims to provide sane access to mailing list archives as if they were a simple folder in Thunderbird (and probably Seamonkey as well). From a certain user request, it is likely I will touch on other aspects of mailing lists as well in this extension, e.g., the desired "Reply to List" feature. In addition, however, I will also be using my experience with developing this extension to write a guide to developing extensions involving more complex operations in Thunderbird.

The extension, however, is still very much in the design phases. I would very much welcome any feedback to be sent to Pidgeot18+listarchive@gmail.com (with the "+listarchive" component, it helps me triage replies). Specific pieces of information I am looking for at this point:

  • Mailing list archive URIs; I ask in advance to not send any more mailman URIs (unless it happens to be in a different language than English), as I have several already. I am most interested in accumulating a diverse supply of mailing list implementations and international versions to best determine what impact internationalization plays on list archives.
  • Ways in which you think a mailing list archive should tie into regular email. For example, I believe it should translate a mailing list URI reference (e.g., http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-May/014646.html) into a link to open the message up as a TB email message.
  • Any questions or suggestions for UI (this comes more into play once I have some prototypes working).
  • Any other question you may have (related to listarchive). I'm quite willing to answer them.

Thanks in advance for any comments you send me. I'm also hoping that this will work out well (no reason it shouldn't).

Monday, May 5, 2008

An Update on Life

So I am quite happy today—then again, I'm always happy, but I'm happy for a specific reason today. Over the weekend, I finally got my new laptop. Now, it's not about to start running Crysis anytime soon, but it's quite good for a mid-range laptop, especially now that I'm determined to do things right.

Step one was to install Linux; I use Debian more for historical reasons than anything else, but it works. This time, I didn't manage to accidentally corrupt the Windows' NTFS tree thereby requiring a reinstallation, nor did I try to netinstall off of a wireless connection. However, wireless has proved as daunting a task to solve as it did the last time I tried to do it. After much finessing and going everywhere for information, the irksome driver finally worked under ndiswrapper randomly today. Still requires a lot of manual intervention, but at least I know how to get it to work.

Also fixed today were two irksome problems. My resolution is now back up at the comfortable 1280x800 instead of an annoyingly fat 1024x768. The mouse is now configured to give me a middle click when I click both left and right buttons, a boon for the touchpad. Finally, the most irksome of my problems was the inability to use <Alt>-# to switch screens in irssi; even that's been fixed.

I don't think I did too badly on those two exams I took today that I should have been studying for instead of setting up my laptop, so that's reassuring. Mozilla's building fine right now (I'm waiting for libgklayout.so to link so I can laugh in its face!); scp'ing my data from my old machine seems to be progressing smoothly.

That said, I've still got things to do. I'm planning on finally getting around to requesting CVS privs today. fluxbox still demands some configuration, and laying down on the carpet for lack of desk space is beginning to aggravate my elbows. Hey, libgklayout.so finished building, and I didn't even notice it. There's also the Vista thing of sides to shore up. So far, the only good thing about Vista that I can find is that it comes with better games than XP. I haven't tested the games I've actually paid for yet, though...

Sunday, April 27, 2008

Software Bloat

Although a belated response, this is an attempt to respond to some of the ideas presented in this newsgroup message, and a few other ideas hinted at in subsequent postings, as well as not publicly espoused.

One of the great culprits of modern computer society is the idea of software bloat: that an application has grown too large to be effective. Microsoft Windows and Office are regularly accused of this sin, but even Thunderbird and Firefox are accused; I'm sure that one could dredge up opinions as to why the Linux kernel or X is too bloated. But are these terms fairly applied?

An adage holds that 80% of features are used by only 20% of users, but the problem is that the only-used 20% is different for each user. I personally don't use mail-merge in office applications at all, but I tend to heavily use the advanced outlining options, for example. Does this mean that the mail-merge feature should be stripped? What about macros--evil for most of the public but invaluable for those who heavily rely on them?

I recall reading Slashdot's response to the awesomebar in Firefox. The average response consisted of yelling why it was such a bad idea to include it, most likely by those who never used it before. I had the same response at first, but quickly found it invaluable: going to a specific bugzilla bug allows me to type the bug number, or heading to RFC 3977 by typing just that. And for that site where I remember the title but not the freaking URL, well, that explains itself. In fact, now, I get annoyed when I realize that I am not using the awesomebar because the regular URL bar is so cumbersome. So is the awesomebar bloat? To non-users, yes, but to users, no.

A more specific example to me is Thunderbird. The aforementioned post consisted of a rant (I'm not going to glorify it) as to why Thunderbird should stick to email and only email, no RSS, no calendar, no NNTP, no address book, no... half of it. Would it be better? The RSS component probably detracts from Thunderbird by being half-implemented (I will slyly add in that news has had even worse problems, and few call for that to be stripped out unless prompted), but would one complain if it was well-implemented? I think not. And there are strong reasons, too.

But there is no clear line to draw when excluding features. News is a worthwhile component to include in an email reader: it is quite close to IMAP in many regards. If one includes news support, why not include uuencode? It's useful for multinational stuff or alt.binaries. Why not then yEnc? Combine-and-decode? X-Face? Advanced message scoring? Feature XYZ? At some point, someone can call it all "bloat", but where is the line you need to draw that makes it not bloat?

What's the alternative to bloat? Look at the ultimate example of bloat, Windows; the non-bloated alternative is Linux (Mac is somewhere in between). You have several varieties of Vista, but hundreds of Linux: Debian, Ubuntu, Gentoo, Slackware, OpenSUSE, Red Hat, Fedora Core, etc. Your desktop? The big ones are GNOME or KDE, but FVWM, Fluxbox, Blackbox, XFCE, and many more exist; cross-interoperability, especially between GNOME and KDE, is not close to what Windows provides. In the place of broken one-size-fits-all, we have a multitude of alternatives which can do poor jobs of talking to each other.

The answer, many claim, is in the idea of pluggability. But, here too, the line is very blurry. At what point do you say that extension XYZ should be included into the core? This is what happened with RSS: it first existed as an extension and was later integrated. Although not well-versed in Firefox history, I would be willing to posit that extensions there too have similarly become incorporated. The sum response is that more plugins are included into the core until someone, once again, screams about the bloat, forks, creates a leaner version, which then becomes just as bloated, ad infinitum.

So, what can one do about bloat? In my opinion, the true, final answer is to let the user decide for him or herself what features are needed. Being able to easily compile the source code with options to turn off feature X goes a long way to this. Increasing modularity helps, and, perhaps most importantly, the biggest single help would be to have true, open, universally-supported standards, not just for online communication, but through interprocess and interplatform communications in all regards (i.e., standards closer to an ODF specification than to XML).

Sunday, April 6, 2008

The Great Addressbook Rewrite

As I write this, bug 413260's first part is almost complete. At a diff of -2639/+1747 (47 files changed), the first portion is quite large. That said, substantive changes take place in only two files, accounting for over half the patch. A small portion is given over to the removal of nsIAbMDBCard, while the rest of the patch centers on merely changing the access points. Its size is mostly due to the large number of places it is accessed, not because the feature set is complex.

My original plan for implementation would have followed three large patches with errata in various other patches. The nsIAbCard is relatively self-contained and atomic, so that was how I came up with the plan. However, the startling results from attempting to do nsIAbDirectory refactoring makes this idea unfeasible.

My goal was to remove as much of nsIAbMDBDirectory as possible, which would require invalidating nsIAddrDatabase. That requires major changes to import and palmsync code. Throw in the difficulty of going from a file to an address book directory or a database to a directory and you get some hair-raising complexity. Then add in the fact that mailing lists are, well, black magic, and this process becomes especially complex. And large: my latest WIP touches some 68 files with a diff of a mere -693/+836.

What causes the sheer magnitude of difference in complexity? A card is quite lightweight: it is essentially a map of properties with a bit of extra stuff. There is therefore only one implementation of a card with five sub-implementations that refine it somewhat. A directory is the opposite: a heavyweight object with 4-6 (depending on how you count them) different implementations, sharing little meat among them. A mailing list is quite like black magic: they pop into existence when you need them, and creating one requires some non-intuitive steps.

So, what's my new plan? Well, lesson #1 is to stave off nsIAddrDatabase-gutting until after mailing lists are done. The next steps will be more atomic: the creation of nsIAbCollection and the involved refactoring come is first (probably split up into two or three patches), followed by mailing list sanity with nsIAbGroup (again, maybe a few patches itself). Only afterwards will I remove nsIAddrDatabase from import and palmsync (probably in two batches). Trivial removal of nsIAbMDBDirectory (i.e., where it is used for cardForEmail) will probably be in one of the first directory patches.

Of course, some of the more ambitious changes will need tests, but it looks like hwaara is being nice and writing tests for import (see bug 421050).

Monday, March 31, 2008

Pluggability

Pluggability is an area where there is often still much to explore. A fair amount of the mailnews work involves this area. The address book rewrite (bug 413260) is designed primarily to refactor the interfaces to make adding the SQLite backend (bug 382876) easier: a fair amount of code assumes mork than is healthy. My current WIPs have limited this code to portions within addrbook, palmsync, and parts of import (i.e., not much at all). Not only is the SQLite backend going to benefit, but LDAP does in part (although I have not implemented enough of its methods), and probably Outlook and OS X directories as well.

Another large area where mailnews could use a pluggable interface is storage. In my last post, I discussed my thoughts on storage. To clarify one point: I am not against pluggable storage APIs or even implementations of most of those presented; it is just my opinion that mbox should probably be the default in lieu of a better choice.

A third area is the account manager. As far as I can tell, the only thing everyone can agree upon is that it does not work well as it stands. Try creating a new account type and you'll see what I mean. Killing RDF will help this in part, but the current consensus is to hold off a rewrite in this area until post-Thunderbird 3.

To keep this post short, I'll omit details in the other areas where we could use pluggability. The view pane could use it at least in part (see this site for more information). Supporting synchronization with mobile devices (several bugs exist here) would need one, if we want to go beyond palmsync.