My web pages
I don't use FrontPage, Dreamweaver, or any other web authoring tool.
My web pages are either:
- hand-written HTML using a text editor
- HTML that is generated on-the-fly by perl scripts (called "CGI" scripts)
- static HTML pages that I generate by a perl script beforehand
I have had a lot of fun putting together these web pages. Since many people
ask me questions about creating a web site, I thought I should take a moment to
describe how my particular set-up works. While I am at it, I should give
credit to contributors.
The main perl script
In 2001, I decided that I wanted a new look and feel -- a consistent color
scheme and a navigation bar on the left. This was supposed to make it easier
for visitors to find things without getting lost.
At the time, I had just added a counter to the bottom of the main page. To do
this, I had changed the static index.html page into a CGI script
that would generate the HTML code on the fly. Using the script, I could
increment the counter each time someone viewed the page, and I could display
the number as plain text. This is a fast and elegant way to implement a counter --
many other solutions require you to download the images of the individual digits
from a SLOW server used by millions of people.
Taking on these two changes at once (the new look and the CGI script), I
reorganized the entire site. Now, every page is displayed within the light
blue frame, and each page view generates a random quote at the bottom of the
page.
Here's how the code is organized.
The main script
Libraries of common subroutines
Content generated on-the-fly
This script and the helper libraries control the presentation of the outer
frame (the blue part). But the actual page contents (the grey part) come from
plain old HTML pages *. The script builds an HTML
table, and fills in the top and left tiles with the standard stuff.
Then it "inserts" the HTML from the content page into the right-side tile in
the table. For example, the page you are reading now is a
static HTML page,
but it has been inserted into my standard "frame" (not an HTML frame).
* Or sometimes the content is generated on the fly
by the main perl script ("Porter family news" is a good example of this).
The résumé generator
Right before my interview with Ericsson, I started polishing my résumé,
which was (of course) in HTML format. However, I kept getting distracted with
FORMATTING issues when I needed to be looking at CONTENT. So I decided to whip
up a little
perl script to separate the formatting from the content.
The functions at the bottom handle the format, while the function calls at the
top handle the content. The script generates two output files: an HTML version
and a plain text version. The content is the same, but the format is different
for each version.
Again, I encourage others to steal this script and use
it to format their own résumé (of course, change the content to
your own experience, ha ha).
The photo album
Before I got a digital camera, I had three pictures on my web site. Now, I have
over 300 pictures! I wanted to put the pictures up on the web in a timely manner,
but I kept having to monkey around with the HTML.
Not any more! My
photo album script generates album pages from one simple
index file. It's very easy for me to re-arrange pictures into separate
album pages now.
The AlanPorter.com domain
I chose a custom domain name because I needed something that was easier to
remember than the long and complicated URL associated with my Internet Service
Provider (http://www.ipass.net/~kr4jb). Boy, did I get tired reading
that address out to people!
While I was trying to come up with a new domain name, I noticed that
alanporter.net had just recently been taken, and I felt like I should go
ahead and register alanporter.com before someone else did. I registered
my new domain name at register.com. It
cost $70 for two years. (Prices are getting lower every day, and some registrars
offer neat services like redirection).
Apparently, I was just in time. A few weeks later, I got an email from some
other guy named Alan Porter that said he had wanted that domain name. I know
that the other guy must have been disappointed. So for him, and for all of the
other "Alan Porter's" around the world, I have created a
list
of other people with the same name as me.
Borrowed works
The maps of Southeast Asia came from ReliefWeb.
|