Older blog entries for davidu (starting at number 5)

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>';
    $i++;
}
Coding questions:

Which is preferred?

(($c == 'a') ? $c = 'b' : $c = 'a');
or
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?)

Personal:

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.

Everybox.com:

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

Codecon:

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!