fanf: (Default)
[personal profile] fanf
I've been playing around with Dan Bernstien's cdb recently. We use it quite heavily - most of the configuration tables on our mail servers are cdb files. I'm quite fond of its simplicity. But the code... DJB doesn't really do layers of abstraction. (He even says "Packages that need to read cdb files should incorporate the necessary portions of the cdb library rather than relying on an external cdb library.") He also doesn't believe in libc: the cdb code includes an incorrect declaration for errno, a braindead wrapper around malloc(), inefficient string functions, a dumb reinvented wheel strerror(), etc. etc. When I was reading the algorithm that constructs the hash tables, I added comments as I went. One of them said:
  /* Afterwards c->start[i] points to the *end* of the ith block. */
Nice variable name!

(Admittedly the next loop adjusts the pointers so that the name becomes correct, but still.)
This account has disabled anonymous posting.
(will be screened if not on Access List)
(will be screened if not on Access List)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org

December 2025

S M T W T F S
 123456
78910111213
14151617181920
21222324 252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated 2025-12-30 20:10
Powered by Dreamwidth Studios