šŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #86080

Re: Nothing is more configurable than Thunderbird.

#86080
From: Joshua Cranmer 🐧
Date: Wed, 09 Jul 2014 00:31
76 lines
6225 bytes
On 7/8/2014 5:19 PM, Darrin "Doc" O'Leary wrote:
> There are plenty of other higher-level networking libraries that can be
> referenced to determine a good way to go.  And if that is *not* the case,
> if even *those* projects are mismanaged such that they don’t stand on
> each other’s shoulders, the people managing them should be given the boot
> until they learn how professional software development gets done.

This is a great example of failing to appreciate the original design. If 
we're referring to how horrible Thunderbird's NNTP code is, first keep 
in mind that it was designed at least as far back as 1998 and possibly 
earlier. Quite frankly, the body of higher-level networking libraries 
was far sparser in those days, and what has been considered good 
practice for developing networking has changed dramatically in the 
intervening 16 years. Oh, and this code was written by paid professional 
software developers.

> The main problems remains that people who write newsreaders seem unable
> to write modular code, and so what *should* be thought of isolated
> functionality (NNTP communication, however implemented) instead is a
> pile of spaghetti that is intertwined with all the newsreader’s other
> code.  Hell, a look at just Thunderbird’s nsNNTPProtocol.cpp shows over
> 50 includes, with another dozen in the .h file!  I’ve got better things
> to do than try to untangle that mess.

You criticize the code for not being modular. The problem is that the 
"mess of headers" is in large part a result of it being modular and 
using modular code. You have headers for basic ADTs like std::vector or 
std::shared_ptr [except using custom variants since this code predates 
the STL being remotely usable]. There's the underlying network API to 
read and write to the socket, as well as handle things like SSL or 
proxies transparently. There's the line buffer for the network stream, 
or the logger to log salient data for debugging. The callbacks for 
knowing what username and password to use if prompted.

What you mean when you say it's not modular is not that it isn't 
modular, but that the modules don't cover the same concepts you want 
them to. You want nsNNTPProtocol.cpp to be the box that just speaks to 
the NNTP server and is almost totally self-contained. But to the person 
who designed the code, nsNNTPProtocol.cpp is the box that implements 
operations at the level of "get a message" or "find new messages in a 
newsgroup." It is designed. It may not be the best design, it may not 
even be a good design, but it is a clear and intentional design.

> You’re making my point for me.  That’s the stuff that all needs to be
> worked out by having discussions *long* before you start coding.  But
> the approach for open source is more often than not all about taking
> whatever code someone manages to crank out and calling it done.

How can you work out all of the problems when some of the problems don't 
exist yet? How would you design your code to support SSL if you predate 
SSL? I don't deny that new code needs to have detailed discussions, but 
it is foolish to think that you could conceive of every possible 
development for a project that might live for 20 or 30 years.

> I can see why they did it, too.  I stated as much.  They did such a
> poor job they would have been fired in any other situation.  Yet
> somehow they are cheered on when their bad designs and bad code comes
> in the form of open source.  It’s a race to the bottom that I’m not
> going to participate in.

The people who wrote that code were paid to write it. It is, quite 
frankly, no better or worse an example of "professional software 
development" than other examples I'm aware of.

I can understand you looking at code for a few minutes and deciding that 
you're not going to bother considering it anymore. I'm not going to 
blame you for disagreeing with that code. But to go so far as to presume 
that the design is so horrid that the developers should have been fired 
is a step too far: understanding the rationale behind the design 
requires examining a lot more evidence in the absence of detailed design 
notes (which, quite frankly, appear to be usually lacking in both 
"professional" development environments and open source).

-- 
Beware of bugs in the above code; I have only proved it correct, not 
tried it. -- Donald E. Knuth
Technical Details
Message-ID: <lpi2h1$fv2$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
References: <1lobwpm.9nuqqn4kgmktN%snipe@spambin.fsnet.co.uk> <lpagko$ksj$1@ news.albasani.net> <lpai46$s37$1@dont-email.me> <lpajoi$4pd$1@news.albasani .net> <lpamgk$eja$1@dont-email.me> <lpbmj2$s63$1@news.albasani.net> < Jeff-Relf.Me@Jul.6{15.07.Seattle.2014}> <lpdqsi$plc$4@news.albasani.net> <lpep6v$ii6$1@dont-email.me> <lpf3mv$1o7$1@dont-email.me> <lpfhhq$gld$1@dont-email.me> <lpfo12$mnk$1@dont-email.me> <lph1bp$6p8$1@dont-email.me> <lphqpm$467$1@dont-email.me>

Show Full Headers
Complete Article Headers
Message-ID: <lpi2h1$fv2$1@dont-email.me>
Subject: Re: Nothing is more configurable than Thunderbird.
Date: Tue, 08 Jul 2014 19:31:20 -0500
From: Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid>
References: <1lobwpm.9nuqqn4kgmktN%snipe@spambin.fsnet.co.uk> <lpagko$ksj$1@ news.albasani.net> <lpai46$s37$1@dont-email.me> <lpajoi$4pd$1@news.albasani .net> <lpamgk$eja$1@dont-email.me> <lpbmj2$s63$1@news.albasani.net> < Jeff-Relf.Me@Jul.6{15.07.Seattle.2014}> <lpdqsi$plc$4@news.albasani.net> <lpep6v$ii6$1@dont-email.me> <lpf3mv$1o7$1@dont-email.me> <lpfhhq$gld$1@dont-email.me> <lpfo12$mnk$1@dont-email.me> <lph1bp$6p8$1@dont-email.me> <lphqpm$467$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
Newsgroups: alt.free.newsservers,news.software.nntp,alt.os.linux
Organization: A noiseless patient Spider
Lines: 76
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 9 Jul 2014 00:31:29 +0000 (UTC)
Injection-Info: mx05.eternal-september.org;
 posting-host="8cedddb29338592f734c41b16a68fadc";
 logging-data="16354"; mail-complaints-to="abuse@eternal-september.org";
 posting-account="U2FsdGVkX199FJ+lh+4llgiowLMIbzcZ57MRMkW0hJg="
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
In-Reply-To: <lphqpm$467$1@dont-email.me>
Cancel-Lock: sha1:9TUhVhw0iLkhKNFQ2xB2hgkQBZQ=