Hacker News new | ask | show | jobs
by berkes 346 days ago
I'd wager that this is marked as "by design" because it technically follows some IMAP spec. What the app does, purely on a technical level, is correct.

I've so often had debates and threads in issues where a developer entrenched in a domain has so much domain-knowledge (ie. tunnel vision) that "technically correct" or "by the spec" is the only correct way. I've been that developer in many cases too, in hindsight.

2 comments

I got also bitten by this. While IMAP would allow for syncing, most MUAs don't have a local mailbox. Instead they have a cache and the offline mode means to put as much as possible in to the cache. But if you want an actual local mail storage, you will eventually have merge conflicts, because how do you deal with a message that is present locally and was on the server, but is no longer? Do you assume the user wants it deleted, or that it should be reuploaded to the server? Either way will be wrong. (Also if you reupload, it will get a new UID, so another MUA will again reupload it, i.e. you will get a copy per MUA.)

So if you want a mailbox sync tool, use a proper program for that like mbsync/isync. (But this can't cope with cross mailbox moves besides (not) propagating them.)

Some developers incorrectly think a spec defines what your program should do instead how to do what your users want.

Another example is HTTP Strict-Transport-Security which specifies that browsers should take control away from users.

Yes, a spec is a technicality that, ideally, should be abstracted away completely (and alas, all abstractions are leaky somewhat).

It's another thing that got me interested in DDD. Where the user, domain, business and such define what things are called, how they operate, what events they undergo or emit etc. And not a spec, language or framework

And where e.g. "the IMAP spec" is a clear bounded domain, probably a service, an adapter or even library. Within that domain, "The Spec" dictates all the naming, conventions, logic etc, but where the border of this domain is another language. E.g. in a "MessageAdapterImap" something is called "EXPUNGE" with all the intricacies of what this means in IMAP. But in the outside it's e.g. part of a "cleanup()" interface, or whatever the domain calls it when it removes messages.