The Misadventures of Dan

Peer into the mind of Dan as he tries to build an MP3 Player for his PDA and searches for the next thing in his life be it an electrical engineering job or graduate school.

Saturday, May 01, 2004

.:12:17:49 PM:.

Comment Board

Building a comment board is pretty easy... especially if you have a database backend you can depend on. :D The most recent comment board has a MySQL database storing all the comments and used PHP for the backend. Why not use Perl? Perl is good but I feel its place is more among actual text processing. With that in mind, one of the more "difficult" things to decide was working with the smilies-which was solved using the str_replace() php function :D (which I think is much easier and straightforward than Regular Expressions).

The primary objective of the tag board was to duplicate the existing board and add the ability for my friend to delete comments. Luckily 'duplicating' on the web really means having the same interface and since HTML is viewable by all having the same 'form' is all good :D (copyyyyyyyyyy and paste!). One of the things I didn't keep was having the comments being listed in table format. I don't understand why you would need a table format considering the it's simply a comment-by-comment thing. It's much easier (from a coding point of view) to just tack on each field you want and then put a break line OR if you're _really_ into it, make each comment a list item and remove the bullets via CSS. Table design is not dead just like Disco isn't really dead... it's just that there are simply better ways of doing stuff.

Take the comment board as an example, why would you want to have the following:
table tag
table-row tag
table-cell tag content
close table-cell tag
close table-row tag

... repeat...

close table tag


Instead of:
list tag
content
close list tag
... repeat ...

Some people may say it doesn't matter because you're using a script language and all you have to do is create the template... but again, which one is easier to read?


.:11:17:32 AM:.

Robots everywhere!

I've added a robots.txt file to the domain. You can see it by going to www.danieltse.com/robots.txt (no sense in linking it :P). Basically what the robots.txt is _supposed_ to do is tell search engines what they can and can't index. From the counter logs I've noticed that a lot of the references are to the main blog page. Unfortunately though, not all search engines cache the site content so by the time someone comes to this site via Google the information is (generally) not there but in the archives. With robots.txt I can tell the search engines to _not_ index the main blog page but the archives. So, we're going to have a look-see and watch how the next few months go :D


home | archives