
D. J. Bernstein - access_denied
http://www.aaronsw.com/weblog/djb
======
mikeryan
I have a feeling that a large portion of the best programmers work in absolute
obscurity.

I worked for a long time with guys that wrote embedded software. Absolutely
brilliant guys that never get their due because no one knows how they were.

------
rv77ax
Dennis MacAlistair Ritchie & Kenneth Lane Thompson.

thread closed.

------
mhd
What is this, the Hill Valley International Programming Tournament?

People have arguments like this all the time in the sports sector, and at
least there you can come up with all kinds of statistics and recordings, but
what do you have for programmers? If they produced Open Source, you might have
the end result of their work, but that would exclude a large part of the work
force. And even then, what are your points of measurements? Just the amount of
bugs? Total? Per year? Per line? Meh.

And as a final, somewhat unrelated note: Which I have nothing against Mr.
Bernstein himself, I've got a pretty low opinion of most djb fanboys I've
encountered in the past...

------
ErrantX
It's a lovely tribute to djb and you cant really fault it.

Except to say "best" is such a subjective thing as to make it useless.

There are many programmers deserving of a "hall of fame" entry.

------
pilif
This is slightly off-topic as it's not about djb, but about qmail. Still:

I have some experience with qmail. While I agree that it's generally very nice
and certainly incredibly bug free, that quality comes at a price: Lack of
features.

The moment you start adding stuff: Server-side filtering (like sieve), LMTP,
virus checking, spam filtering, virtual users - all that stuff you need to run
a modern mail server - you will have to patch qmail.

And by manually patching your installation, you are picking up responsibility:
Now that you are not running stock qmail, but something you patched and
installed yourself, you will no longer be able to rely on your distribution
for security fixes and you'll have to keep updated and repatch yourself.

And while qmail is beautiful and bugfree, the same can not always be said for
the additional patches, so you WILL be patching.

If you get all the patches for the functionality you need to actually play
together that is.

If qmail solves your issue and you are prepared for this, then go with qmail.
If you need a ton of functionality built-into your mailserver, probably go
Exim and if you need good compromise between featureset, architecture and
security, then you'll probably take postfix.

~~~
tptacek
Please avoid Exim. Even if you can't stomach qmail, which is an acquired
taste, you don't have to compromise on security. Smart people can disagree
about whether Postfix is _as_ secure as qmail, but none of them disagree that
it is at least _very_ secure.

------
jacquesm
I think he would have my vote, but there are some other 'great' programmers
out there.

how about this for minimalism: <http://cr.yp.to/>

~~~
tzury
man, this is the man! <http://cr.yp.to/djb.html>

------
innoncent
djb wrote the code that won the EngineYard SHA1 challenge. His code was
processing 800 million sha1 hashes per second. He wrote CUDA and C
implementations. His sha1 implementation was 12 times faster than OpenSSL.

------
wallflower
Bill Joy

"As a UC Berkeley graduate student, Joy worked for Fabry's Computer Systems
Research Group CSRG in managing the BSD support and rollout where many claim
he was largely responsible for managing the authorship of BSD UNIX, from which
sprang many modern forms of UNIX, including FreeBSD, NetBSD, and OpenBSD.
Apple Inc. has based much of the Mac OS X kernel and OS Services on the BSD
technology.

Some of his most notable contributions were the vi editor, NFS, and csh. Joy's
prowess as a computer programmer is legendary, with an oft-told anecdote that
he wrote the vi editor in a weekend. Joy denies this assertion.[2]"

<http://en.wikipedia.org/wiki/Bill_Joy>

~~~
rit
Exactly my thought when I read this. IIRC he wrote one of the early TCP/IP
implementations as well, which a lot of OS' still use a derivative of. And dns
and mail rely upon.

The wikipedia article links specifically to a sadly abandoned project that
Salon had years ago to document the free software revolution.

[http://dir.salon.com/story/tech/fsp/2000/05/16/chapter_2_par...](http://dir.salon.com/story/tech/fsp/2000/05/16/chapter_2_part_one/index.html)

I've always remembered it and wished they'd finished but it sadly seems to
have stopped getting new entries in '01:

<http://dir.salon.com/topics/free_software_project/>

------
owinebarger
Despite the purple prose, I generally agree with Aaron's sentiments about
great programming ("the best", I can't say, but definitely "great"). He is,
however, also very rude, at least in his online persona. Having "a forceful,
uncompromising vision" is an orthogonal issue to how you choose to
communicate.

~~~
idlewords
I can't read anything Aaron writes without my mind flying back to his seminal
essay on the unanticipated softness of the human breast:

<http://them.ws/post/1736/testing_something>

~~~
ErrantX
Thanks for that. Not come across it before and I cant remember a blog post
that actually touched me so deeply!

------
allan_
This article is pathologically sick. Couldn't read it any more, to painful.
qmail gives you pain, too. It is completly useless without applying patches,
which are mostly of poor quality. And it misleads you to do most unperformant
things around it. Like writing shellscripts which fork() like hell for every
mail there is to process.

------
csmajorfive
I love djb and his tools but, as someone who hacked djbdns extensively for a
research project, I think the project misses empathy for other programmers.
It's hard to follow, poorly documented, and too clever sometimes. That said,
if we judge code only on performance, then yeah it's rock solid.

------
kilowatt
I was with Aaron until

> What other field combines all these arts? Language, math, art, design,
> function. Programming is clearly in a class of its own. And, when it comes
> to programmers, who even competes with djb? Who else has worked to realize
> these amazing possibilities? Who else even knows they are there?

Is this satire?

~~~
unalone
Yeah, only slightly obnoxious. Nothing worse than somebody so relatively new
to a field that they still think it objectively is better/cooler/more
fulfilling than every other field.

~~~
aaronsw
It's hard to claim I'm new to programming. I did it for over a decade and then
retired from it. Perhaps it's just nostalgia, then.

~~~
unalone
I know you are. Pretty much anybody with any ear for Reddit drama knows who
you are. But you're sounding here like a child.

------
techiferous
"One bug — one bug! — was found in qmail."

While this is certainly impressive, the number of bugs is not a good metric
for measuring the effectiveness of a programmer. A programmer is only as good
as the business problems she solves.

One bug in a life-critical application could be catastrophic. On the other
hand, a programmer that makes sure their code is completely bug-free would not
do well in a domain where time-to-market is critical and quality of service is
not.

~~~
idlewords
Also, the number is at least four bugs.
<http://cr.yp.to/qmail/qmailsec-20071101.pdf>

~~~
antirez
and this is about just security bugs. All the other bugs are not counted.

------
aaronsw
I much preferred the old title. Can a moderator put it back?

------
bayareaguy
djb is also the author of one of my favorite database libraries:
<http://cr.yp.to/cdb.html>

------
l0stman
> No other programmer has this kind of track record. Donald Knuth probably
> comes closest, but his diary about writing TeX (printed in Literate
> Programming) shows how he kept finding bugs for years and never expected to
> be finished, only to get closer and closer (thus the odd version numbering
> scheme).

I don't want to be dismissive but I think TeX is more complex and uses non
trivial algorithms. So it's like comparing an apple to an orange.

~~~
jacquesm
Anybody that says an email server is 'non trivial' hasn't looked at the guts
of one yet.

~~~
tptacek
As someone who has hacked mail servers, written DNS servers, and come within
100 miles of typesetting, I'm going to throw in my vote that TeX addresses a
_much_ harder problem than qmail.

~~~
jacquesm
No contest there, but qmail is far from 'trivial'.

If you're going to compare qmail to something else though I think it should be
compared to sendmail (or postfix for that matter), not to TeX.

Personally I think djb is a great coder, but there are quite a few of those
around.

Programming is not a single-valued enterprise anyway, so best is a very hard
to measure quantity, as good as meaningless. But I know 'bad' when I see it :)

~~~
tptacek
The algorithms and pure theoretical CS in qmail actually is trivial. From what
I remember, pretty much the only genuinely interesting thing in it is how he
implemented his hash table.

From a systems programming perspective, qmail is not only nontrivial, but
actually groundbreaking. His allocator design, the way he architected his libc
replacement, the extent to which he takes advantage of bare-metal Unix
programming (look at his queue notification mechanism), it's all really cool
stuff.

But there's a big difference between theoretical CS and systems programming,
and the parent commenter is right to point out that TeX is more complicated
from a CS perspective than qmail is.

------
mgrouchy
who cares?

------
c00p3r
There are several less known project with really passionate coding, especially
<http://nginx.net/>. postfix, sqlite and many other projects could be compared
with qmail.

------
niels
Not to forget daemontools.

~~~
dustingetz
I was surprised and looked him up on wikipedia -- he did indeed write
daemontools.

~~~
bd
Not to be confused with Daemon Tools :)

<http://en.wikipedia.org/wiki/Daemontools>

<http://en.wikipedia.org/wiki/Daemon_Tools>

------
ecq
the best programmer is the person who have made the biggest difference in
people's lives.

it's not measured by the no. of lines of code, bugs,etc.

~~~
capablanca
So, Bill Gates.

~~~
gjm11
Biggest _positive_ difference.

------
shawnps
Could someone clarify this for me, please? On this page:

<http://cr.yp.to/djbdns/intro-dns.html>

under the "Multiple Servers" section, he says

"To protect against computer failure, there are actually several root servers,
several .to servers, and two yp.to servers."

I don't understand, is he saying there are only two DNS servers in the world
that you can contact to resolve yp.to?

~~~
shawnps
Is there a way to find out for any given domain how many actual servers hand
out responses to other DNS servers to hold in their caches?

~~~
wmf
You can use WHOIS or dig, e.g.

$ dig yp.to ns

; <<>> DiG 9.4.3-P3 <<>> yp.to ns ;; global options: printcmd ;; Got answer:
;; ->>HEADER<<\- opcode: QUERY, status: NOERROR, id: 63068 ;; flags: qr rd ra;
QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION: ;yp.to. IN NS

;; ANSWER SECTION: yp.to. 184700 IN NS b.ns.yp.to. yp.to. 184700 IN NS
f.ns.yp.to.

------
tzury
Linus, RMS, Guido, and others. I can think of so many other names.

You know what, even John Resig's jQuery software is served by millions of
servers, running in billions of web pages every day.

This all "THE BEST" thing, is somehow pointless IMO.

~~~
davidw
It really does seem a bit pointless. Why not just say "djb writes great,
beautiful code - some of the best I have ever seen" and leave it at that?

~~~
rortian
I agree, but aaronsw must come at an issue as a raging partisan. I know that
in economics, philosophy, politics, and apparently best programmer ever!!!, he
always comes at the issue with a deeply contentious point of view from an
entrenched idealogical camp.

It's kind of a shame because of the the advantages of being young is being
able to approach a field without having to take sides. Meaningful dialog and
inquiry void of motivated reasoning are beautiful things. Unfortunately, some
people need an argument.

~~~
raganwald
_the advantages of being young is being able to approach a field without
having to take sides._

You must be describing your youth, not mine! My experience with youth is that
it was the period of my life in which the whites were blindingly white, the
blacks impossibly back, and there were no colours or shades of grey to
distract us from our belief that we knew exactly what was right and what was
wrong.

And thank goodness, because a belief in right and wrong can propel you to
change the world while you have the energy to carry it through :-)

~~~
rortian
It's a far point. I was referring to youth in the twenties sense. Of course
younger than that you are quite right. Immaturity is a bitch.

Unfortunately, certitude can also lead people to be fierce advocates of the
status quo.

~~~
madair
Heheh. Spoken like a person in their 20s

------
tptacek
DJB's code is a lot of things, but when someone says "beautiful" is one of
them, I start thinking about how I might quiz them to get them to prove that
they've actually read it. Smarter coders than me have sat in rooms for
nightlong studies of qmail and come to the conclusion that, while clever, the
C code in qmail and djbdns has clearly been compiled down from some higher
level language[1]. If that code is anything, it is idiosyncratic.

[1] Having asked this question directly to DJB in person, I can say that I am
at least convinced he wrote this stuff in C.

~~~
andreyf
Having so clear a vision of how your architecture should behave that you
human-compile it into idiosyncratic code that looks generated seems to be a
very good definition of beautiful code, no? Maybe he hasn't had time to write
a book about the "code patterns" which he's using, but that's hardly something
to hold a grudge about.

~~~
tptacek
Especially if you're a security person, I think it's uncontroversial to say
that the design is beautiful. It's not only an elegant design, but it is the
first major piece of systems code to take that design approach. To put it
differently: most of major systems programs that have been proven secure in
the last 10 years owe their design to qmail.

But that has nothing to do with the code, which is not only epsilon from
assembly (Bernstein fully embraces the notion of writing code in high-level
assembly), but also clever and concise almost to a fault.

As someone who ran qmail since it was originally released in beta, I also
remember vividly Bernstein's original idea about configuration, which is that
"configuring" your mail server with C code was more reasonable than learning
another programming language (Sendmail "cf"). Which implies that a lot of the
code in the interesting parts of qmail are less about design, and more about
encoding mail routing policy as C code.

~~~
bdr
Are there are any well-written overviews of the aspects of qmail's design that
you're referring to?

~~~
vidarh
I don't specifically know of any overviews, but the main principles are fairly
simple:

\- Split the system into small components that do one thing and do them well.
\- Give each part of the system the minimal set of privileges needed (if
necessary by running as different users and set filesystem privileges
accordingly). I.e. qmail has separate binaries for inbound smtp, pop3,
managing the queue, local delivery, remote delivery and more. \- Make each
part of the system communicate only via well defined interfaces (using pipes
in qmail) where it is explicitly assumed that you can't really trust the
sender. \- Don't ever use library functions that don't length check things.
Then again he uses his own stdio replacement, and his own string functions.

------
whirlycott1
I have dealt with qmail for ten years. It is a complete joy once you have it
up and running. You literally can stop thinking about it because it always
works. However, getting it up and running requires adding in antispam,
antivirus, virtual mailboxes, some additional protective and administrative
patches, some extra stuff for SMTP-AUTH, SSL/TLS, reporting, and perhaps a few
more patches for fun.

Patches, you say? Well, I'm glad you really like source code, because that's
exactly what you'll be dealing with to get all of this up and running. I've
done it many times before manually and it takes around ten hours to do it.

While Aaron's point is that djb's code, vision and discipline are possibly
unmatched (I concur on all counts), the software (principally qmail) is
antiquated in the sense that nobody needs just that one part in order to run a
semi-modern email system.

So, as you start downloading the .tgz for qmail and begin studying it like
good campers, remember that this wonderful code is, by itself, not up to the
job that it purports to serve.

\-- Lots of love,

Someone who currently runs two qmail systems and will never go to the trouble
of setting one up again

~~~
andreyf
If code I write is hard to deploy to your system, I don't think my code can be
to blame. Rather, it's the fault of the system/language in which we are
working.

~~~
astine
I hate this attitude. If your code targets my system, I should be able to
install it without editing it.

~~~
KirinDave
Amen.

If no one can use your code, it doesn't matter how beautiful, well-thought-
out, or well-written it is. Software exists for the purpose of being executed.
If your project cannot be deployed with a reasonable amount of effort, it's
worse than bad software, it's a waste of time.

~~~
jrockway
What about easy-to-install software that makes it easy for Bad People to ruin
the Internet and to compromise your server (and potentially your entire
organization)?

That is bad too. If I had to pick between "secure + customizable but hard to
setup" and "easy to set up, but is a one giant gaping security problem", I
think I would rather have the first.

Software is about collaboration, like a relationship; one person shares their
ideas (qmail), another shares his (your site's configuration), and both
parties do better than the sum of their parts. Easy-to-install software that
doesn't require thought or communication is a one-way conversation; nice in
the short term, but not something you want to be with for the rest of your
life.

------
antirez
(read this message with a background of "arguing about the best programmer is
anyway silly")

djb is in no way the best programmer of the world, but he is a very smart
programmer, and probably an even better mathematician. And now, my arguments
about why he is not the best programmer.

1) djb software is not the most elegant software around at all. Actually
trying to write high performance and bug free software his style is the most
procedural possible, with very little abstractions layers.

2) his software is well known to be uneasy to configure. There are qmail
hackers around. When there are <name of a unix deamon>-hackers around it's a
bad sign about the quality of the interface between the program and the rest
of the system and the system administrator itself.

3) Djb played no role at all in the programming languages world. AFAIK he
never suggested some new idea for programming languages or new directions that
are now considered important. You can't be _the best_ without being
influential in the field.

4) Djb newer wrote big systems that were crucial for the programming world.
Qmail and djbdns can disappear tomorrow and everything will be up and running
anyway. GCC or the Linux Kernel are a different matter.

I can continue, but I think 1+2+3+4 are already enough to deny the argument
aaronsw is trying to push in the article.

~~~
crucini
I question #3. Why is it admirable to play a role in the languages world?
Shouldn't languages be a means to an end? If the end is good applications, DJB
showed that you can produce good applications in C.

It seems like a lot of the energy around languages is frivolous. It's more fun
to play with language features than to attack a real-world problem like
writing a mail server.

As for #4, why does criticality matter? And why does the audience have to be
programmers? Couldn't the author of a spreadsheet be as worthy as the author
of a compiler?

Not that I'm endorsing DJB's nomination; I have pored through his source code
for various reasons and have some reservations about it. But you could do much
worse.

(And yes, it's all silly.)

~~~
antirez
#3: sure, in general terms. Not true in my opinion for the _best_ programmer
of the world. Naturally he is "the one" that can master programming so well
that it _must_ be able to drive even programming language designers into more
expressive / productive languages. djb can never be the one as in his code is
very rare to find high level abstractions.

as for #4 it's very admirable to write real world software, but the best
programmers in the world, like Joy or RMS tend to write big systems that can
be used by the other hackers in the world, because to write a new operating
system, a C compiler that live for decades contributing even to the
development of new operating systems (It's hard to imagine Linux without GCC
in some way), or world class text editors (vi, emacs) is not something
everybody can do, but only the best programmers in the world.

~~~
vorador
Writing a text editor is a relatively easy task and it's more a matter of user
interface than of implementation. Besides, I don't see why writing a mailer
daemon is less important than, say, a text editor.

~~~
antirez
To write a text editor today is very different that inventing the first VIsual
editor that is a major step forward, or Emacs that was a similar impressive
step forward at the time.

~~~
vorador
What do you mean by that ?

------
known
Bill Gates

~~~
ErrantX
I think you're being a little unfairly downvoted. I don't think anyone would
claim Gates should win prizes for minimal or beautiful code.

But he certainly did a lot of good programming.

In any hall of fame where we mention Linus, Guido and Bernstein we probably do
need to mention Gates as well.

~~~
viraptor
And where can we find any of his programs to look at?...

~~~
ErrantX
anything in the first few years of MS.

Altair.BASIC

~~~
viraptor
Of course. But I meant the source for which he could "win prizes for minimal
or beautiful code". AFAIK none of it is legally available to anyone.

~~~
gjm11
I don't know whether it's legal, but <http://www.interact-
sw.co.uk/altair/index2.html> has an annotated disassembly of Altair BASIC. I
haven't given it more than the briefest glance myself, but allegedly there's
some very nice stuff there. (Of course it's from a different era and no one
outside deeply-embedded-land writes that sort of code any more other than for
a twisted kind of fun.)

