I'll get right on that. :)  Personally I find the code to be quite readable, 
except in a few places where the technical needs outweigh the human needs (e.g. 
configuration.c and dns.c) -- in those places you'll find comments. :)  In 
general all my code is pretty bare of comments, because they increase the 
maintenance work (update the code, then update the comments) and I don't 
usually have trouble following my own work (even years later).  I certainly 
don't want to discourage anyone from contributing to spamdyke, but I'm having a 
lot of trouble finding *any* time to work on spamdyke these days, so adding 
comments may have to wait a while.

Adding a new filter is actually one of the safest things to do, provided you're 
implementing something that's approximately close to an existing filter.  
Copying an existing function and replacing the logic inside should be pretty 
straightforward.  Then insert the calls to your filter function in spamdyke.c 
near the calls to the function you copied and add a configuration option in 
configuration.c (using the comments there).  If you're concerned you've broken 
something, you can always run spamdyke's test scripts.  They won't tell you if 
your feature works correctly (unless you write some scripts for it) but they'll 
at least help spot anything that stopped working.

And of course I can try to answer questions, as long as they're more specific 
than "how does the code work?". :)

-- Sam Clippinger

On Sep 2, 2011, at 5:05 AM, Marcin Orlowski wrote:

> Hi,
> 
> Sam, could you please consider making spamdyke sources
> more human readable :) by adding comments here and there?
> Recently it's like reading qmail sources - quite PITA if you
> ask me (luckily with less number of variables like i, k, f :).
> I needed to add new filter yesterday and I was swearing quite
> a lot at you :) It'd would help to have at some doc describing
> main logic blocks and data flow, or at least spamdyke.c
> smtp_filter() commented a bit (digging thru this big
> if/else/if/else block hurts). It'd also help to have some
> filter.c and related structs commented so I'd be more certain
> if my filter is not going to nuke something not obvious.
> 
> Regards,
> -- 
> "Daddy, what "Formatting drive C:" means?"...
> 
> Marcin             http://wfmh.org.pl/carlos/
> _______________________________________________
> spamdyke-users mailing list
> [email protected]
> http://www.spamdyke.org/mailman/listinfo/spamdyke-users

_______________________________________________
spamdyke-users mailing list
[email protected]
http://www.spamdyke.org/mailman/listinfo/spamdyke-users

Reply via email to