Benjamin Lu

everyday is cool

Checking HTML with a Validator

A browser will often display a page even when some of its markup is malformed. That makes visual testing a poor way to tell whether the source is sound. An HTML validator gives you a second check. Try it with a small HTML 4.01 page. Put an image on the … Continue reading →

2004: Looking Back

Written retrospectively for the 2004 archive. A thing I still like about making websites is how quickly a small idea can turn into something I can show someone. A line of text becomes a heading. A link takes you to a page that didn’t exist a few minutes before. Looking … Continue reading →

The Copy I Want to Keep

Written retrospectively for the 2004 archive. I like the idea of saving a copy of a site before changing its design. A screenshot tells me what it looked like, but it leaves out the experience of clicking through it. The HTML and images let me reopen the old pages and … Continue reading →

Trying a Class in the PHP 5 Era

Written retrospectively for the 2004 archive. PHP 5 arrived in July 2004 with a revised object model. To see one reason to use a class, try keeping the parts of a page title together in a small object. The example can run on a modern local PHP installation: <?php class … Continue reading →

Checking an Image Before Upload

Written retrospectively for the 2004 archive. Before adding a photo to a page, open it at the size you expect the reader to see. A large original can look fine when the browser scales it down, while the visitor still has to download the whole file. Make a resized copy, … Continue reading →

One Menu on Three Pages

Written retrospectively for the 2004 archive. Make a homepage, an About page, and a Links page. Give each the same three navigation links in the same order. A reader should be able to move between the pages without having to learn a new menu each time. Now add a short … Continue reading →

2003: Looking Back

Written retrospectively for the 2003 archive. When I think about the early web, I remember how much personality could fit into a little home page. Someone could put up a few links and a short introduction, and you could already tell what they were interested in. Looking back at 2003, … Continue reading →

Making a Simple Links Page

Written retrospectively for the 2003 archive. One of the things I like about early personal sites is how much a links page could tell you about the person behind it. A handful of useful links with a note beside each one made a page worth bookmarking. To recreate one, make … Continue reading →

Counting Website Pages with Python

Written retrospectively for the 2003 archive. Python 2.3 was released in July 2003. A little file-counting script is a way to revisit the kind of site maintenance task that was useful then. Run this version with a current Python installation: import os count = 0 for name in os.listdir("."): if … Continue reading →

What Early WordPress Changed

Written retrospectively for the 2003 archive. WordPress made its first public release in May 2003. Looking back from a site built with separate HTML files, the change worth noticing is where the work of publishing went. A new entry could be stored by the blogging software and shown through a … Continue reading →