summaryrefslogtreecommitdiff
path: root/doc/djblegacy.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/djblegacy.html')
-rw-r--r--doc/djblegacy.html151
1 files changed, 151 insertions, 0 deletions
diff --git a/doc/djblegacy.html b/doc/djblegacy.html
new file mode 100644
index 0000000..0cdd891
--- /dev/null
+++ b/doc/djblegacy.html
@@ -0,0 +1,151 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <meta http-equiv="Content-Language" content="en" />
+ <title>skalibs: the djb legacy</title>
+ <meta name="Description" content="skalibs: the djb legacy" />
+ <meta name="Keywords" content="skalibs c unix djb legacy library libstddjb" />
+ <!-- <link rel="stylesheet" type="text/css" href="http://skarnet.org/default.css" /> -->
+ </head>
+<body>
+
+<p>
+<a href="index.html">skalibs</a><br />
+<a href="http://skarnet.org/software/">Software</a><br />
+<a href="http://skarnet.org/">skarnet.org</a>
+</p>
+
+<h1> The DJB legacy </h1>
+
+<h2> Who is this DJB guy, and why is he so special anyway&nbsp;? </h2>
+
+<p>
+<a href="http://cr.yp.to/">Dan J. Bernstein</a> is a cryptologist and
+a mathematician; he's also the author of a widely known and used MTA,
+<a href="http://cr.yp.to/qmail.html">qmail</a>, as well as a few
+lesser known pieces of software.
+</p>
+
+<p>
+ For some time he was quite active in some Unix software-related
+Internet newsgroups and mailing-lists; he quickly became a
+controversial figure of the Unix programming community, mostly
+by being extremely vocal against well-known authors of
+"mainstream" Unix software and by suggesting designs so removed
+from traditional software design that a normal human reaction is
+to first view him as a complete nut.
+</p>
+
+<p>
+ I do not care for controversy. I am interested in the code. I was
+a sysadmin at the time, and still learning to program in C beyond
+what they teach you in school (i.e. not much). I had heard enough
+horror stories with sendmail; so I gave a shot at qmail, trying to
+understand its design principles and the way it was made. And then
+I fell down the rabbit hole.
+</p>
+
+<p>
+ Look, I don't care what you think of the guy, I don't know him
+anyway, and this is totally beside the point. The only thing that
+matters is that DJB's software is <strong>right</strong> in so
+many ways. This software <strong>works</strong>. DJB's design
+principles are <strong>sound</strong> and elegant; they are
+sound foundations to build <strong>reliable, secure, and
+low resource-consuming</strong> software. And the design,
+when you get used to it, feels so unix-ish: it's Unix the way it
+should have been from the start.
+</p>
+
+<p>
+ Studying DJB's software was the best course in C/Unix programming
+I ever had. Now I <em>teach</em> C/Unix; and I am really glad I
+learned from the best.
+</p>
+
+<h2> Building beyond DJB's works. </h2>
+
+<p>
+ There's already
+<a href="http://thedjbway.b0llix.net/">a lot you can do</a> with
+pristine DJB software and some brains.
+</p>
+
+<p>
+ However, I mostly see DJB as a pioneer. He showed it was possible
+to think Unix differently and build secure, reliable and efficient
+software without investing millions of dollars into it; now it is
+up to software architects and programmers to use the breakthrough
+and build upon it. There's a real demand for quality Unix software
+out there; it's time to supply. And
+<a href="http://thedjbway.b0llix.net/friends.html">I am not the only
+one</a> thinking this way.
+</p>
+
+<p>
+ So, skalibs.
+</p>
+
+<p>
+ One of the "DJB philosophy" key points is to <em>question the
+interfaces</em>. You have a task to do; you have existing interfaces.
+What do you do?
+</p>
+
+<ul>
+ <li> Most people don't even think about it and use the existing
+interfaces, even if it amounts to cramming a square peg into a
+round hole. This is why buffer overflows exist. This is why
+people use abominations such as
+<a href="http://www.opengroup.org/onlinepubs/9699919799/functions/gets.html">gets()</a>,
+<em>which is still in the Single Unix Specification as of version 4,
+in freaking June 2011</em>. This is why the System V
+initialization scheme is still prevalent in Linux distributions,
+despite being one of the slowest and most unreliable of all
+initialization schemes. This is why people still use the
+atrocious "libresolv" DNS client library. </li>
+ <li> An alternative way of thinking is to ask yourself:
+"Is the interface I have adequate for the task at hand?"
+ <ul>
+ <li> If yes: perfect, use that interface. </li>
+ <li> If no: then <em>do not use</em> that interface, duh. Design a
+better one and use it: so the complexity will be split and the code
+will be easier to maintain. </li>
+ </ul> </li>
+</ul>
+
+<p>
+ Interfaces should be questioned <em>right down to the libc</em>. You
+cannot build strong software on flakey foundations. And from a system
+and network programmer's point of view, one thing is clear: <em>most
+standard libc interfaces suck.</em> There is no buffered asynchronous
+I/O. There is no timed I/O. There is no heap management helper. Even
+<a href="libstddjb/safewrappers.html">simple system calls are not
+guaranteed to succeed!</a>
+</p>
+
+<p>
+ That is where skalibs comes from. skalibs results from questioning
+the libc interfaces, and providing replacements or additions where
+the existing interfaces do not make it easy to write reliable, secure
+and efficient software. It is <em>inspired by</em> DJB's work. It is
+not a shrine or anything of the kind.
+</p>
+
+<h2> Conclusion </h2>
+
+<p>
+ So, in short, DJB is not a guru, I'm not a mindless brainwashed fan,
+and the "DJB advocates" are not a cult. We just think DJB brought
+something to Unix and more generally to the software programming world;
+we learned from him, we write software following
+sound principles that he was one of the first to really apply, and we give
+credit where credit is due.
+</p>
+
+<p>
+ Use our software. You will never want to go back.
+</p>
+
+</body>
+</html>