Older blog entries for davidu (starting at number 8)

PowerDNS: Despite not knowing c++, I wrote a patch to PowerDNS to support granular access for AXFRs. The patch should apply cleanly to -cvs current and it includes support for postgresql right now. Check the patch and if you know c++, let me know what you think. Special thanks to ahu for the help he provided along the way.

School: It looks like I'll be spending a few weeks at the start of summer working at the Duke Primate Facility with one of my professors. I'll have my computer but net access might be tough in the middle of an 80 acre enclosed 'forest.' Maybe I'll set up some nice WiFi access into the reserve...or maybe I'll just enjoy the company of other monkeys.

22 Feb 2003 (updated 22 Feb 2003 at 22:19 UTC) »
Codecon: Wireless seems to be up.

CryptoPy seems pretty interesting. A good way to parse algs and understand them, as the author notes, speed is not the first priority.

OpenRatings -- I don't think I understand why this was presented...The discussion of the social implications have been mildly interesting but as far as I can tell it's just a php project...

Anyone live in Berkeley going to CodeCon?

I'll be staying at a friends house near campus during CodeCon and was planning to take the BART over to SF each morning.

If someone is planning to drive over and wants to offer a ride that'd be great. (Or if someone is planning to BART over maybe we can coordinate since I hear it can be a pretty boring ride.) Send me an email if you want to plan something.


8 Jan 2003 (updated 8 Jan 2003 at 05:26 UTC) »

Cool: There.com

School: I'm back at school a week early. It's nice to be back and my upcoming classes look fantastic. Annoyingly, one of my classes was cancelled because only a few kids signed up. I was under the impression that small classes justified my huge tuition. Sigh, I guess like most things, it's all about the money.

mglazer: [Note: Erased, not worth any of our time.]

PowerDNS: ahu's PowerDNS is a awesome. It's easy to use, fast, and easy to maintain. I have a feeling a lot more people will begin to use it as they find out about it. Best of all, it's small and the code is easy to read.

mglazer: Please don't deport me. I hope you don't drive an SUV, do drugs, or drive alone.

PowerDNS: ahu's PowerDNS is a awesome. It's easy to use, fast, and easy to maintain. I have a feeling a lot more people will begin to use it as they find out about it. Best of all, it's small and the code is easy to read.

26 Dec 2002 (updated 26 Dec 2002 at 22:06 UTC) »

deekayen: I agree with and appreciate what you wrote. As a side note, the example I gave was for creating alternating rows in a table (using PHP). I discovered a solution which is even better for this sort of "back and forth" type of coding. It's simply using $i%2 to alternate a class every other line. Then I just have two css styles which vary the color in the rows.

$i = 1;
foreach ($rows as $row) {
    echo '<tr class="row' . ($i % 2) . '">';
    // TD $row stuff.
    echo '</tr>';
Coding questions:

Which is preferred?

(($c == 'a') ? $c = 'b' : $c = 'a');
if ($c == 'a') {
    $c = 'b';
} else {
    $c = 'a';
I'll admit, I prefer the first example as it's more concise and I understand it right away.

Also, sometimes people write ('a' == $c) instead of the "common" ($c == 'a') in various control statements to avoid accidental (pointless) assignments which would always eval to true. Is this a common practice and is it worth me modifying my coding practices or is this just more of nuance some people have with their code?

Progress on Everybox.com:

Coding has picked up quite a bit of the new version of my code. Much to my own surprise I've stopped using DJB's tinydns software and have switched to Bert Hubert's recently opened PowerDNS. The postgresql backend has proven quite nice and stable so far.

Now all I need to do is figure out an easy/nice/stable way to replicate PostgreSQL. (any ideas?)


I finished the semester off exceedingly well. I recieved one surprising grade which I hope to have corrected (I seriously hope it was a mistake!). It's always nice to have a good idea of grades when done with a class so that when it comes time to check grades online there are no surprises. It's the worst feeling to think you did well in a class and to find out you didn't. It seems like the higher level my classes get, the more secure I am in my grades and the less I worry about (or even have) final exams.

PHP and Databases:

mglazer: Have you seen metabase?

On a somewhat related note.... Pear::DB is slow, real slow. Writing my own helper DB class and dropping Pear::DB seems to have improved performance by a factor of ten.


I love the Tigris.org style sheets. Everybox.com is being built with it as a base.


Codecon is coming up at the end of Feb. I haven't been to the bay area in quite some time and I'm already excited.

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!