SoftDNS 0.2
Joseph Sinclair
plug-development at stcaz.net
Mon Dec 5 15:27:12 MST 2005
Paul Dickson wrote:
> Over the last two and half weeks I rewrote tinydns from djbdns in
> Python. I have most of the functionality. I'm missing a bit of the
> details, specifically the dns database optional parameters, but the core
> functions pretty well (the first complete end-to-end tests were only done
> a couple of hours ago, but I've doing module testing as I when along).
>
----
What did you use for testing? Did you use a framework, custom code,
or manual testing?
> The code is here:
> http://members.cox.net/paul.dickson/softdns-0.2.tar.bz2
>
> The optional parameters for the data entries in the tinydns.txt file are
> very recent. Their processing is still a bit of a hack (in other words,
> don't expect nicely written code).
>
> I've started using git/cogito for this project, which I learned last
> Saturday.
>
----
If you can, it'd be interesting to have a post on this list with your experiences
with git/cogito.
> I started this project in order to understand the C code. So to aid in
> the understanding, I rewrote the C code in Python.
>
> The original C code had a lot of error checking, in fact just about every
> line had some error checking (which is requirement for C).
----
Actually, modern C code (and even more so C++) doesn't require such
extensive error checking, there are better techniques available.
That said, I've seen a lot of system-level code with what is best described as
excessive error checking, usually because it's so catastrophic when
system software fails. Embedded looks like this a lot too. I've written
embedded routines where error checking consumed 80% of the code,
and then had to make the whole thing still fit within a strictly defined
time allocation.
> In one C routine, I was able to compress it down from 24 lines to one line
> (although it does have three expressions :-). A lot of my code expansion
> over the original is due to comments and debugging artifacts as well as a
> bit of still emulating C code where I don't totally grok the C code's
> intent.
----
You can always post to this list with C questions (or any other language for that matter)
There's bound to be an expert on the list who'd be happy to offer an answer or suggestion.
>
> -Paul
>
> _______________________________________________
> PLUG-devel mailing list - PLUG-devel at lists.PLUG.phoenix.az.us
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.plug.phoenix.az.us/pipermail/plug-devel/attachments/20051205/a49c6a1a/signature.pgp
More information about the PLUG-devel
mailing list