4 ms·
> I used to believe (with, I think, good reason) that people who had viscerally negative opinions of him were betraying something important (and bad) about them
by sillysaurusx 4y ago
> I used to believe (with, I think, good reason) that people who had viscerally negative opinions of him were betraying something important (and bad) about themselves. That might have been true at the time (call it '96-'06). It's less true now.
So… what do you dislike about his C code? It would be interesting to hear what a viscerally negative but correct opinion about code would look like.
It’s certainly difficult to write C well. But it’s hard to imagine you saying something like that about cperciva’s. Did djb do something to earn it?
I have basically no experience with his code, but it sounds like you could teach readers something about what you’ve seen.
- inopinatus 4y agoIt’s notoriously cryptic, undercommented, and heavy on idiosyncracies, particularly the macros. Nevertheless you can learn a lot from deciphering djb’s source, particularly with regards to defensive programming, so don’t be afraid to dive in. Just recognise it wasn’t necessarily engineered for ease of collaboration. Once you get a feel for the internal structures you may be surprised how clearly you can reason about it. Perhaps it’s a matter of taste but I always preferred working on Wietse Venema and Timo Sirainen’s code.
- nineteen999 4y agoIndeed, and Venema's Postfix was a huge win for sysadmins at the time who were sick of sendmail and didn't like the "half required batteries included" approach of qmail, eg. dealing with spotty support for Maildir in other software.
- petre 4y agoUet Maildir + indexes is used now by almost every imap implementation.
- cperciva 4y agoI think it's important to realize that djb's code is an artifact of the era when it was written -- the 1990s, before C99 existed. A lot of his code would be far more readable if "translated" to use types and standard library functions which exist in modern C but didn't exist at the time.
- tptacek 4y agoI don’t have a strong opinion about it. I have held varying opinions over the years, but my take now is that outside of the kernel, I’m over C, much as I still enjoy writing it.
- tyingq 4y agoAlso, a fair amount of macros to make it build on different platforms with varying endianess, alignment needs, differently named syscalls/functions, and so on.
- deleted 4y ago[deleted]
- 1vuio0pswjnm7 4y agoPeople dislike the style. However if style actually mattered in terms of the whether or not the code is useful, then no one would be using his cryptography contributions, let alone calling them his only "important" contribution, because the cryptography was written in the same style as the programs he wrote in the 1990s. (Bias: I still use them everyday.)
- deleted 4y ago[deleted]